Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Bug: Upgrade to 8.5.0 breaks linting setup with NX and projectService: true #9985

Closed
@hoi4

Description

@hoi4

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

  1. clone the repo
  2. npm i
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting responseIssues waiting for a reply from the OP or another partybugSomething isn't workinglocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions