Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser. The file does not match your project config: .eslintrc.js.
The file must be included in at least one of the projects provided.eslint
이런식으로 에러가 떳다.
아래의 링크를 참조해서 오류를 고쳤는데.. 3가지 방법이 있다
https://github.com/nestjs/nest/issues/4900
eslint: Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser. · Issue #4900 · nestjs/nest
Here is the fix #4900 (comment) Bug Report I installed nest and start new project. and there is a problem with eslint: in .eslint.js I got error Parsing error: "parserOptions.project" has...
github.com
1. eslintrc.js 를 eslintrc.ts로 변경
2. "createDefaultProgram" : true를 parserOptions에 추가 (parserOptions는 eslintrc.js 안에 module.exports 안에 만들어준다)
parserOptions: {
"project": "./tsconfig.json",
sourceType: "module",
tsconfigRootDir: __dirname,
//"createDefaultProgram": true
},
3. ignorePatterns: ['.eslintrc.js'], 를 추가해준다
현재 tslint에서 eslint로 변경중인데.. 뭔가 복잡하다.
'■ Web개발 > 기타등등' 카테고리의 다른 글
cursor AI 단축키 모음 (1) | 2024.10.07 |
---|---|
크롬 localhost '연결이 비공개로 설정되어있지 않습니다' 오류 해결법 (0) | 2024.04.10 |
unknown error on npm install "npm ERR! Unexpected token '.'" on using NVM 해결방법 (0) | 2023.02.01 |
vscode에서 React + typescript + esLint + prettier 프로젝트 시작 세팅 (0) | 2021.09.24 |
IIS 를 통해 웹 게시하기 (rewrite, ORCA) (0) | 2021.09.01 |