- ⚙️ This rule is included in all of
"plugin:vue/essential"
,"plugin:vue/strongly-recommended"
and"plugin:vue/recommended"
.
When duplicate arguments exist, only the last one is valid. It's possibly mistakes.
This rule reports duplicate attributes.
v-bind:foo
directives are handled as the attributes foo
.
👎 Examples of incorrect code for this rule:
<MyComponent
:foo="def"
foo="abc"
/>
👍 Examples of correct code for this rule:
<MyComponent :foo="abc"/>
<MyComponent foo="abc"/>
allowCoexistClass
- Enables v-bind:class
directive can coexist with the plain class
attribute.
allowCoexistStyle
- Enables v-bind:style
directive can coexist with the plain style
attribute.
'vue/no-duplicate-attributes': [2, {
allowCoexistClass: Boolean // default: true
allowCoexistStyle: Boolean, // default: true
}]
parse5
remove duplicate attributes on the tokenization phase.
Needs investigation to check.