ESLint

· WEB/Vue.js
[Vue.js] Eslint + Prettier ⏎······· 오류 1. 오류 vue-cli 로 프로젝트를 만들고 실행하니 다음과 같은 줄바꿈을 하라는 오류가 나왔다. 2. 해결 .eslintrc.js 에 prettier 규칙 추가 [참고] [Prettier] htmlWhitespaceSensitivity 속성 // .eslintrc.js rules: { "prettier/prettier": [ "error", { htmlWhitespaceSensitivity: "ignore", } } } 그리고, vscode eslint 설정에 autoFixOnSave 옵션을 true로 변경 변경한 파일을 저장할 때마다 자동으로 eslint를 실행시켜 문제(오류)가 있으면 수정후 저장해주는 기능이다. [참고] htt..
· WEB/Vue.js
[Vuejs][VScode] 'v-slot' directive doesn't support any modifier. [vue/valid-v-slot] 'v-slot' directive doesn't support any modifier. eslint-plugin-vue 👍 해결방법 .vscode/settings.json 파일에 아래 옵션을 추가해 주면 된다. // .vscode/settings.json { "vetur.validation.template": false } [참고] https://gitmemory.com/issue/vuejs/eslint-plugin-vue/1269/668921391
· 기타
[VSCode] EsLint rules 추가하기 프로젝트에 .eslintrc.js 파일을 만들어 규칙을 추가하면 된다. 하지만, 이는 vscode에서 코딩 시 적용되는 규칙이 아닌, 프로젝트 실행 시 console(개발자 도구)에 표시되는 eslint 관련 규칙이다. vscode에서 코딩하면서 eslint 규칙 적용하여 보고 싶은 경우 settings에서 수정해주면 된다. vscode settings(cmd+ ,)에서 ui로 특정 규칙을 추가할 수 있지만, 상세한 rules는 이처럼 Edit in settings.json을 눌러 settings.json에서 규칙을 추가해 주면 된다. eslint.options의 rules안에 .eslintrc.js 파일처럼 rules를 추가할 수 있다. { "eslint..
S0PH1A
'ESLint' 태그의 글 목록