vue/no-duplicate-attr-inheritance
enforce
inheritAttrs
to be set tofalse
when usingv-bind="$attrs"
📖 Rule Details
This rule aims to prevent duplicate attribute inheritance.
This rule suggests applying inheritAttrs: false
when it detects v-bind="$attrs"
being used.
🔧 Options
json
{
"vue/no-duplicate-attr-inheritance": ["error", {
"checkMultiRootNodes": false,
}]
}
"checkMultiRootNodes"
: If set totrue
, also suggest applyinginheritAttrs: false
to components with multiple root nodes (whereinheritAttrs: false
is the implicit default, see attribute inheritance on multiple root nodes), whenever it detectsv-bind="$attrs"
being used. Default isfalse
, which will ignore components with multiple root nodes.
"checkMultiRootNodes": true
📚 Further Reading
🚀 Version
This rule was introduced in eslint-plugin-vue v7.0.0