Description
Before You File a Bug Report Please Confirm You Have Done The Following...
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have searched for related issues and found none that matched my issue.
- I have read the FAQ and my problem is not listed.
Issue Description
After upgrading typescript-eslint
to the latest version 8.5.0
my linting setup with NX broke.
The respective error message is Parsing error: Could not read project service default project 'tsconfig.json': error TS5012: Cannot read file 'tsconfig.json': ENOENT: no such file or directory
. The respective files are included in a tsconfig.lib.json
file which is being referenced from tsconfig.json
. The same applies to files included by tsconfig.spec.ts
(also referenced by tsconfig.json
).
I am using projectService: true
with a NX monorepo (see reproduction repo). The same setup worked fine with version 8.4.0
. The breaking change seems to be #9893.
Reproduction Repository Link
https://github.com/hoi4/typescript-eslint-issue
Repro Steps
- clone the repo
npm i
npx nx lint nx19 --skip-nx-cache
Alternatively, when using eslint
directly with an example file: npx eslint apps/nx19/src/app/app.component.ts
The latest commit uses version 8.5.0
which has the described issue. The previous commit holds a working state with version 8.4.0
.
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
8.5.0 |
@typescript-eslint/parser |
8.5.0 |
@typescript-eslint/utils |
8.5.0 |
TypeScript |
~5.5.2 |
ESLint |
9.10.0 |
node |
20.15.0 |