vue/no-reserved-component-names
disallow the use of reserved names in component definitions
- ⚙️ This rule is included in all of
"plugin:vue/vue3-essential"
,*.configs["flat/essential"]
,"plugin:vue/essential"
,*.configs["flat/vue2-essential"]
,"plugin:vue/vue3-strongly-recommended"
,*.configs["flat/strongly-recommended"]
,"plugin:vue/strongly-recommended"
,*.configs["flat/vue2-strongly-recommended"]
,"plugin:vue/vue3-recommended"
,*.configs["flat/recommended"]
,"plugin:vue/recommended"
and*.configs["flat/vue2-recommended"]
.
📖 Rule Details
This rule prevents name collisions between Vue components and standard HTML elements and built-in components.
🔧 Options
json
{
"vue/no-reserved-component-names": ["error", {
"disallowVueBuiltInComponents": false,
"disallowVue3BuiltInComponents": false,
"htmlElementCaseSensitive": false,
}]
}
disallowVueBuiltInComponents
(boolean
) ... Iftrue
, disallow Vue.js 2.x built-in component names. Default isfalse
.disallowVue3BuiltInComponents
(boolean
) ... Iftrue
, disallow Vue.js 3.x built-in component names. Default isfalse
.htmlElementCaseSensitive
(boolean
) ... Iftrue
, component names must exactly match the case of an HTML element to be considered conflicting. Default isfalse
(i.e. case-insensitve comparison).
"disallowVueBuiltInComponents": true
"disallowVue3BuiltInComponents": true
"htmlElementCaseSensitive": true
👫 Related Rules
📚 Further Reading
- List of html elements
- List of SVG elements
- Kebab case elements
- Valid custom element name
- API - Built-In Components
- API (for v2) - Built-In Components
🚀 Version
This rule was introduced in eslint-plugin-vue v6.1.0