How to deal with vue/multi-word-component-names ? #482
-
| 
         When using this plugin, components under "pages" are imported created using the filename 
 Is there a recommended way to solve this issue? Thank you  | 
  
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
| 
         ATM, I turned off the rule only for files inside  If someone would stumble upon the same problem. this is my flat config file // @ts-check
import { readFileSync } from 'node:fs'
import pluginJs from '@eslint/js'
import tseslint from 'typescript-eslint'
import pluginVue from 'eslint-plugin-vue'
import eslintConfigPrettier from 'eslint-config-prettier'
const eslintAutoImport = JSON.parse(
  readFileSync('./tsconfig/eslint-auto-import.json', { encoding: 'utf8' })
)
export default [
  { languageOptions: eslintAutoImport },
  pluginJs.configs.recommended,
  ...tseslint.configs.recommended,
  ...pluginVue.configs['flat/recommended'],
  {
    files: ['**/*.vue'],
    languageOptions: {
      parserOptions: {
        parser: tseslint.parser
      }
    }
  },
/* to solve unplugin-vue-router */
  {
    files: ['src/pages/**/*.vue'],
    rules: {
      'vue/multi-word-component-names': 'off' 
    }
  },
  eslintConfigPrettier
] | 
  
Beta Was this translation helpful? Give feedback.
-
| 
         Based on https://stackoverflow.com/a/41316801/3207406, I created a  {
  "rules": {
    "vue/multi-word-component-names": "off"
  }
} | 
  
Beta Was this translation helpful? Give feedback.
ATM, I turned off the rule only for files inside
pagesfolder onlyIf someone would stumble upon the same problem. this is my flat config file