vue/no-unused-vars
disallow unused variable definitions of v-for directives or scope attributes
- ⚙️ This rule is included in all of
"plugin:vue/essential",*.configs["flat/essential"],"plugin:vue/vue2-essential",*.configs["flat/vue2-essential"],"plugin:vue/strongly-recommended",*.configs["flat/strongly-recommended"],"plugin:vue/vue2-strongly-recommended",*.configs["flat/vue2-strongly-recommended"],"plugin:vue/recommended",*.configs["flat/recommended"],"plugin:vue/vue2-recommended"and*.configs["flat/vue2-recommended"]. - 💡 Some problems reported by this rule are manually fixable by editor suggestions.
📖 Rule Details
This rule report variable definitions of v-for directives or scope attributes if those are not used.
🔧 Options
json
{
"vue/no-unused-vars": ["error", {
"ignorePattern": "^_"
}]
}ignorePattern... disables reporting when your definitions of v-for directives or scope attributes match your ignorePattern Regular expression. defaultnull, will ignore nothing
🚀 Suggestion
- When your ignorePattern set to
^_, we could provide a suggestion which add a prefix_to your variable and no more eslint error
🚀 Version
This rule was introduced in eslint-plugin-vue v3.14.0