pageClass | sidebarDepth | title | description |
---|---|---|---|
rule-details |
0 |
vue/no-reserved-component-names |
disallow the use of reserved names in component definitions |
disallow the use of reserved names in component definitions
This rule prevents name collisions between Vue components and standard HTML elements and built-in components.
<script>
/* ✗ BAD */
export default {
name: 'div'
}
</script>
{
"vue/no-reserved-component-names": ["error", {
"disallowVueBuiltInComponents": false,
"disallowVue3BuiltInComponents": 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
.
<script>
/* ✗ BAD */
export default {
name: 'transition-group'
}
</script>
<script>
/* ✗ BAD */
export default {
name: 'teleport'
}
</script>