-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Bug: Upgrade to 8.5.0 breaks linting setup with NX and projectService: true
#9985
<
8000
/h1>
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
parserProject: true
projectService: true
Aha! This is from #9893. That PR landed under the assumption if that the cwd being linted should generally have a Which brings up a question: why is there not a root-level |
the same happened to me with 8.5, cli works great but vscode could not locate the root tsconfig.json in a turbo monorepo. Eslint configuration is in another package |
I also ran into this issue in a Turbo monorepo when trying to upgrade to 8.5.0. CLI works great, but VSCode linting broke. I'm not the OP, but I'll add my 2c here in case it helps:
This is what we do, although I won't claim it's optimal. But the idea is that in our mono-repo, all the "real" Typescript files live in a workspace, and different workspaces may need different Typescript compiler settings. So the root workspace contains a partial |
Exactly, having a root This issue is all about files that are included in a tsconfig, the respective |
Thanks all, this is helpful! I'd underestimated how common+desirable it is for projects to not include a root-level |
With #9989 merged, this issue should be resolved. Per https://typescript-eslint.io/users/releases/#canary:
Please let us know if that doesn't fix things for you 🙂. And thanks for using the new project service & latest versions all! |
Quickly tested my reproduction project with |
Before You File a Bug Report Please Confirm You Have Done The Following...
Issue Description
After upgrading
typescript-eslint
to the latest version8.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 atsconfig.lib.json
file which is being referenced fromtsconfig.json
. The same applies to files included bytsconfig.spec.ts
(also referenced bytsconfig.json
).I am using
projectService: true
with a NX monorepo (see reproduction repo). The same setup worked fine with version8.4.0
. The breaking change seems to be #9893.Reproduction Repository Link
https://github.com/hoi4/typescript-eslint-issue
Repro Steps
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 version8.4.0
.Versions
@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
The text was updated successfully, but these errors were encountered: