[vue] should always be multi-word

hyeonjoodev·2023년 1월 10일
post-thumbnail

Component name "index" should always be multi-word

새로운 컴포넌트를 생성할 때 해당 오류를 겪었다.

Vue에서 컴포넌트를 생성할 때 HTML 요소와 혼동되는 요소를 제거하기 위해 2개 이상의 단어를 조합하는 것을 추천한다.
ESLint(ECMA Javascript)를 설치했을 경우, 컴포넌트의 이름이 합성어가 아닐 때 오류가 발생한다.

해결방법

  1. 접두사 My, The 붙이기
  2. vue.config.js 에 lintOnSave:false 추가하기
// 프로젝트 /에 vue.config.js 파일

const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave:false
})
profile
이현주

0개의 댓글