yarn add --dev eslint
{
...
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
]
}
[Info - 10:31:57 AM] ESLint server stopped.
[Info - 10:31:58 AM] ESLint server running in node v12.8.1
[Info - 10:31:58 AM] ESLint server is running.
[Error - 10:31:59 AM] The eslint library loaded from /Users/ruden/Desktop/development/2022/test/node_modules/eslint/lib/api.js doesn't export a CLIEngine. You need at least eslint@1.0.0
package.json eslint 설치 버전은 8버전이 설치되어 있는 것을 확인할 수 있습니다.
{
"devDependencies": {
...
"eslint": "^8.9.0"
},
}
vscode-eslint에서 eslint@8을 지원하지 않기 때문에 발생한 에러입니다. 아마 추후에 업데이트를 통해 지원될 예정할 것이라 예상하지만, 현재는 직접 설치해서 해결해야되는 불편함이 있기 때문에 업데이트 되기 전까지는 7버전을 사용하는 것을 추천합니다.
Adapt ESLint v7 API · Issue #972 · microsoft/vscode-eslint
With the recent release of ESLint v7, CLIEngine was deprecated in favor of a new async ESLint class: CLIEngine deprecation notes I've had some difficulty in getting this to work in VSCode (curr...
github.com
eslint@7 버전 설치
yarn add --dev eslint@7
'개발 > 트러블슈팅' 카테고리의 다른 글
git 대소문자 파일명 폴더명 오류 (Changing capitalization of filenames in Git) (0) | 2022.03.27 |
---|---|
[Jest] Scss "Syntax Error: Invalid or unexpected token" 에러 해결방법 (0) | 2022.02.19 |
Typescript 에서 console을 인식하지 못하는 문제 (0) | 2022.01.18 |
SSH 로그인 접속 시 퍼미션 문제 (UNPROTECTED PRIVATE KEY FILE) (0) | 2021.12.15 |
타입스크립트(Typescript)에서 JSON import하는 방법 (1) | 2021.05.26 |
이 포스팅은 쿠팡파트너스 활동의 일환으로, 이에 따른 일정액의 수수료를 제공받습니다.