pageClass | sidebarDepth | title | description |
---|---|---|---|
rule-details |
0 |
vue/no-unused-vars |
disallow unused variable definitions of v-for directives or scope attributes |
disallow unused variable definitions of v-for directives or scope attributes
- ⚙️ This rule is included in all of
"plugin:vue/essential"
,"plugin:vue/strongly-recommended"
and"plugin:vue/recommended"
. - 🔧 The
--fix
option on the command line can automatically fix some of the problems reported by this rule.
This rule report variable definitions of v-for directives or scope attributes if those are not used.
<template>
<!-- ✓ GOOD -->
<ol v-for="i in 5">
<li>{{ i }}</li>
</ol>
<!-- ✗ BAD -->
<ol v-for="i in 5">
<li>item</li>
</ol>
</template>
Nothing.