vite를 사용해서 React + TS 프로젝트 환경을 세팅하던 중 ESLint 오류가 발생했다.
.eslintrc.cjs와 vite.config.ts 파일에서 ESLint 오류가 발생하고 있다. 😬😬
// eslintrc.cjs
Parsing error: ESLint was configured to run on <tsconfigRootDir>/.eslintrc.cjs using parserOptions.project: <tsconfigRootDir>/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
// vite.config.ts
Parsing error: ESLint was configured to run on `<tsconfigRootDir>/vite.config.ts` using `parserOptions.project`: <tsconfigRootDir>/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
.eslintrc.cjs파일에서 ignorePatterns 속성을 추가해주면 된다.
// .eslintrc.cjs
...
ignorePatterns: ['.eslintrc.cjs', 'vite.config.ts'],
...
Reference
https://github.com/vitejs/vite/issues/13739
로컬환경에서 메타태그 테스트하기(ngrok 사용) (0) | 2024.01.24 |
---|---|
프로젝트에 Open Graph(OG) 설정하기 (0) | 2024.01.24 |
[Netlify] React 프로젝트 배포하기 + Page Not Found 에러 해결 (0) | 2023.10.10 |
[ESLint] 'module' is not defined 해결법(React+TypeScript+Tailwind 환경) (0) | 2023.07.14 |
브라우저의 렌더링 과정, 레이아웃과 리페인트 (2) | 2023.07.05 |
댓글 영역