Skip to content

"vue/valid-v-bind-sync" is not accounting for "is" attribute #1298

Closed
@rq-tgriffin

Description

@rq-tgriffin

What rule do you want to change?
vue/valid-v-bind-sync

Does this change cause the rule to produce more or fewer warnings?
Fewer

Please provide some example code that this change will affect:

<table>
    <tr is="my-row" 
        :some-prop.sync="somePropValue"
        :some-other-prop.sync="someOtherPropValue">
        <td></td>
    </tr>
</table>

What does the rule currently do for this code?
Displays the error/warning, '.sync' modifiers aren't supported on <tr> non Vue-components, for every prop containing the .sync modifier.

What will the rule do after it's changed?
Evaluate any .sync modifier implementation as valid if the target element has a valid is attribute.

Additional context
The is attribute is used for dynamic components and to work around limitations of in-DOM templates (see Vue documentation):

<!-- necessary because `<my-row>` would be invalid inside -->
<!-- a `<table>` element and so would be hoisted out      -->
<table>
  <tr is="my-row"></tr>
</table>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions