- ⚙️ This rule is included in all of
This rule checks whether every
v-for directive is valid.
📖 Rule Details
This rule reports
v-for directives in the following cases:
- The directive has that argument. E.g.
- The directive has that modifier. E.g.
- The directive does not have that attribute value. E.g.
- If the element which has the directive is a custom component, the component does not have
<your-component v-for="item in list"></your-component>
v-bind:keydirective does not use the variables which are defined by the
<div v-for="x in list" :key="foo"></div>
If the element which has the directive is a reserved element, this rule does not report it even if the element does not have
v-bind:key directive because it's not fatal error. vue/require-v-for-key rule reports it.
This rule does not check syntax errors in directives. vue/no-parsing-error rule reports it. The following cases are syntax errors:
- The directive's value isn't
alias in expr. E.g.
- The alias isn't LHS. E.g.
<div v-for="foo() in list"></div>
👫 Related Rules
This rule was introduced in eslint-plugin-vue v3.11.0