You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Components that inherit $attrs into a nested element in the component typically wouldn't want to get duplicated attributes applied to the top-level element. Might be a good linting rule to warn to apply inheritAttrs: false when it detects v-bind="$attrs" being used.
The text was updated successfully, but these errors were encountered:
I'm not sure about this rule. It might lead to false-positives, the inheritAttrs might not be explicitly set on the component if it uses a mixin. And having it reporting in one scenario and not in the other seems not very consistent and might actually be misleading in my opinion. WDYT @chrisvfritz ?
As long as we can avoid false positives (e.g. by just turning the rule off if we detect a mixin or Object.assign/spread on the component object), I think it could be useful. From what I've seen, it's very rare for inheritAttrs: false to come from an external source, so this would still catch 99% of cases.
Components that inherit
$attrs
into a nested element in the component typically wouldn't want to get duplicated attributes applied to the top-level element. Might be a good linting rule to warn to applyinheritAttrs: false
when it detectsv-bind="$attrs"
being used.The text was updated successfully, but these errors were encountered: