-
Notifications
You must be signed in to change notification settings - Fork 0
eslint가 vscode에서 동작하지 않아요
- 작성자: @Yunseo Hwang
- 작성일: 2021.10.27
- Description: telbby-backend를 clone 하여 vscode에서 작업 중 자동포맷팅이 수행되지 않는 것을 발견했습니다.
telbby-backend repository를 clone하여 vscode에서 작업하고 저장을 하니 어떠한 변화도 일어나지 않았습니다.
세미콜론을 빼먹었음에도 말이죠,,,
그래서 ESLint의 OUTPUT 패널을 확인하고 해당 오류를 구글링 했습니다.(오류 화면은 캡쳐하지 못했어요,,,)
구글링 결과, vscode-eslint
repository에 관련 이슈가 등록되어 있었습니다.
Support ESLint 8 current error is doesn't export a CLIEngine · Issue #1329 · microsoft/vscode-eslint
아래와 같은 오류가 발생하고 vscode-eslint가 현재 ESLint@8을 지원하고 있지 않은 것 같다라는 내용의 이슈였죠.
[Error - 5:27:34 AM] The eslint library loaded from
/Users/junger/drive/dev/public/eslint8/node_modules/eslint/lib/api.js doesn't export a CLIEngine.
You need at least [email protected]
해당 이슈에 남긴 코멘트를 확인한 결과 10월 10일에 ESLint@8이 릴리즈되어 현재 vscode-eslint에서도 ESLint v8.0.0을 지원하기 위한 insider 버전이 pre-release로 배포되어 있었습니다.
하지만 pre-release로 배포되어 있기에 직접 설치를 해줘야 하는 단점이 있었고 결정적으로 이미 설치되어 있는 eslint plugin, config들이 ESLint v8과 호환되지 않을 가능성도 충분히 있었습니다.
라고 맘을 먹고 eslint-config-airbnb-typescript에서 안내하는 대로 설치하려고 봤는데....
$ npm info "eslint-config-airbnb-base@latest" peerDependencies
{
eslint: '^5.16.0 || ^6.8.0 || ^7.2.0',
'eslint-plugin-import': '^2.22.1'
}
eslint-config-airbnb-base부터 v8을 아직 호환하지 않는 다는 것을 알 수 있었습니다,,, ㅎㅎ