vue/no-unused-components
disallow registering components that are not used inside templates
- ⚙️ This rule is included in all of
"plugin:vue/vue3-essential"
,"plugin:vue/essential"
,"plugin:vue/vue3-strongly-recommended"
,"plugin:vue/strongly-recommended"
,"plugin:vue/vue3-recommended"
and"plugin:vue/recommended"
.
📖 Rule Details
This rule reports components that haven't been used in the template.
Note
Components registered under PascalCase
or camelCase
names have may be called however you like, except using snake_case
. Otherwise, they will need to be called directly under the specified name.
🔧 Options
json
{
"vue/no-unused-components": ["error", {
"ignoreWhenBindingPresent": true
}]
}
ignoreWhenBindingPresent
... suppresses all errors if binding has been detected in the template defaulttrue
ignoreWhenBindingPresent: false
🚀 Version
This rule was introduced in eslint-plugin-vue v7.0.0