-
-
Notifications
You must be signed in to change notification settings - Fork 690
Closed
Labels
Description
Checklist
- I have tried restarting my IDE and the issue persists.
- I have read the FAQ and my problem is not listed.
Tell us about your environment
- ESLint version: 7.32.0
- eslint-plugin-vue version: 7.17.0
- Node version: 14.17.6
- Operating System: Windows 10
Please show your full configuration:
module.exports = {
root: true,
env: {
browser: true,
node: true
},
parserOptions: {
parser: '@babel/eslint-parser',
requireConfigFile: false
},
extends: [
'@nuxtjs',
'plugin:prettier/recommended',
'plugin:nuxt/recommended'
],
plugins: ['prettier'],
// add your custom rules here
rules: {
'no-console': [
'warn',
{
allow: ['info', 'warn', 'error']
}
],
'vue/valid-v-slot': [
'error',
{
allowModifiers: true
}
],
'vue/no-unregistered-components': ['off', {}],
'vue/component-name-in-template-casing': [
'error',
'PascalCase',
{
registeredComponentsOnly: false
}
]
}
}
What did you do?
<template>
<component :is="someComponent"></component>
</template>
What did you expect to happen?
As the docs explain in the note, I expected the vue/component-name-in-template-casing
rule to ignore the built-in <component>
What actually happened?
Raw output from ESLint
Component name "component" is not PascalCase. eslint(vue/component-name-in-template-casing)
Note: Same story for <client-only>
and <keep-alive>
built-ins. However, <slot>
and <template>
are ignored.
Repository to reproduce this issue
https://github.com/hestiaAI/hestialabs-experiences/
I added the following configuration to .eslintrc.js
to fix the issue temporarily:
ignores: ['/^component|client-only|keep-alive$/']