❗️Parsing error ESLint was configured to run on /.eslintrc.js
NextJS에서 eslint 설정하는 과정에서 생긴 오류
❗️오류 해결
Error) ❗️Parsing error: ESLint was configured to run on
1
2
3
4
5
6
Parsing error: ESLint was configured to run on `<tsconfigRootDir>/???/.eslintrc.js` using `parserOptions.project`: /???/tsconfig.json
However, that TSConfig does not include this file. Either:
- Change ESLint's list of included files to not include this file
- Change that TSConfig to include this file
- Create a new TSConfig that includes this file and include it in your parserOptions.project
See the typescript-eslint docs for more info: https://typescript-eslint.io/linting/troubleshooting#i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-fileeslint
Solution) tsconfig.json에 내용 추가
1
2
3
4
5
6
7
"include": [
"**/*.js",
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".eslintrc.js"
],
tsconfig.json 파일에 includes 항목에 ".eslintrc.js”
내용을 추가하여 해결함
이 기사는 저작권자의 CC BY 4.0 라이센스를 따릅니다.