Open
Description
Please describe what the rule should do:
Require :is
does not appear on tags other than <component>
What category should the rule belong to?
- Enforces code style
- Warns about a potential error
- Suggests an alternate way of doing something
- Other (please specify:)
Provide 2-3 code examples that this rule should warn about:
Potentially confusing:
<VModal :is="computedProp">
<a :is="element">
Better:
<component :is="computedProp">
<component :is="element">
Additional context
We already have require-component-is to enforce having an :is
attribute for any instance of the <component>
tag which is more a practical concern. Having :is
on a different tag however will function perfectly in Vue, but it is potentially confusing since glancing at the tag in the template we will get the impression that the tag is what it is.
This could alternately be considered an enhancement of the existing rule, but presumably it can't be the default to avoid breaking change