I am using the Vue ESLint plugin and it has a rule for not allowing single word component names.
However, I am also using Nuxt, and to set a default Layout in Nuxt you need a .vue component named default.vue
which throws the ES Lint rule errors.
I can't seem to get it to just disable in that one .vue file that is actually pretty small...
<template>
<div>
<Header/>
<Nuxt/>
</div>
</template>
But if I disable the rule in my .eslintrc.js
then it works.
module.exports = {
root: true,
env: {
browser: true,
node: true,
},
extends: [
'@nuxtjs/eslint-config-typescript',
'plugin:nuxt/recommended',
'prettier',
],
plugins: [],
// add your custom rules here
rules: {
'vue/multi-word-component-names': 'off',
},
}
Is there a way to disable the rule for just one Vue file?