-
카테고리
-
세부 분야
프론트엔드
-
해결 여부
해결됨
[질문] eslint.validate
21.10.11 16:15 작성 조회수 400
1
안녕하세요 캡틴판교님 typescript 입문 강의 부터 실전까지 정말 강의 잘 듣고 있습니다 :)
setting.json 에서 validate 를 추가하면 아래와 같은 에러가 발생하는데 구글링을 하면서 찾아보고 적용을 해봐도 도저히 해결을 못하겠어서 글을 남깁니다.
뭐가 문제인지 알고싶습니다. :)
뭐가 문제인지 알고싶습니다. :)
setting.json 입니다 .
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
--------------------------------------------
이 부분을 추가하면 아래 에러가 발생합니다.
--------------------------------------------
이 부분을 추가하면 아래 에러가 발생합니다.
"eslint.validate": [
"javascript",
"typescript"
],
_--------------------------------------------
_--------------------------------------------
"eslint.alwaysShowStatus": true,
"eslint.workingDirectories": [
{
"mode": "auto"
}
],
"javascript.suggestionActions.enabled": false,
"liveServer.settings.donotShowInfoMsg": true,
}
에러
ESLint: Failed to load plugin '@typescript-eslint' declared in '.eslintrc.js': Class extends value undefined is not a constructor or null Referenced from: C:\Users\dlals\OneDrive\바탕 화면\captain\learn-typescript\project\.eslintrc.js. Please see the 'ESLint' output channel for details.
ESLint: Failed to load plugin '@typescript-eslint' declared in '.eslintrc.js': Class extends value undefined is not a constructor or null Referenced from: C:\Users\dlals\OneDrive\바탕 화면\captain\learn-typescript\project\.eslintrc.js. Please see the 'ESLint' output channel for details.
.eslintrc.js입니다 ↓
module.exports = {
parserOptions: {
parser: '@typescript-eslint/parser',
},
root: true,
env: {
browser: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
plugins: ['prettier', '@typescript-eslint'],
rules: {
'prettier/prettier': [
'error',
{
singleQuote: true,
semi: true,
useTabs: false,
tabWidth: 2,
printWidth: 80,
bracketSpacing: true,
arrowParens: 'avoid',
},
],
},
};
답변을 작성해보세요.
1
장기효(캡틴판교)
지식공유자2021.10.13
안녕하세요 재호님, 제가 답변이 좀 늦었네요..! settings.json을 직접 조작할 때 에러가 난다면 ctrl + , 로 settings 메뉴 가신 다음에 eslint 검색하셔서 옵션들을 UI로 조작해 보시는게 좋을 것 같습니다 :)
0
답변 2