javascript/Vue.js

[Vue.js] error Component name "main" should always be multi-word vue/multi-word-component-names 에러날때

http://portfolio.wonpaper.net 2023. 9. 18. 23:02
C:\Users\wonpa\Desktop\frontend\talkitkr\src\components\main.vue
  1:1  error  Component name "main" should always be multi-word  vue/multi-word-component-names

C:\Users\wonpa\Desktop\frontend\talkitkr\src\components\test.vue
  1:1  error  Component name "test" should always be multi-word  vue/multi-word-component-names

C:\Users\wonpa\Desktop\frontend\talkitkr\src\router\index.js
  3:10  error  'createWebHashHistory' is defined but never used  no-unused-vars

 

위와 같이 에러가 날때

 

[ vue.config.js ]

 

1
2
3
4
5
6
7
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
   ...
   // 단일 단어의 컴포넌트를 사용가능하도록
   lintOnSave:false
});
 
cs

 

수정한다음

 

yarn server 로 실행하거나, npm run server 해서 돌려본다.

 

 

참고 : https://ssjeong.tistory.com/entry/VUE-should-always-be-multi-word-component-%ED%95%B4%EA%B2%B0%ED%95%98%EA%B8%B0-ESLint