Skip to content

Bug: Excess <tsconfigRootDir>/../../... before parserOptions.project complaints #6289

Closed
@JoshuaKGoldberg

Description

@JoshuaKGoldberg

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

The error message for a TS file not being found can sometimes start with <tsconfigRootDir>/../../../../ before the root path to the user's repo:

/Users/josh/repos/trpc/examples/next-prisma-websockets-starter/test/playwright.test.ts
  0:0  error  Parsing error: ESLint was configured to run on `<tsconfigRootDir>/examples/next-prisma-websockets-starter/test/playwright.test.ts` using `parserOptions.project`: <tsconfigRootDir>/../../../../users/josh/repos/trpc/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-file

The path should instead be printed as users/josh/repos/trpc/tsconfig.json.

Reproduction Repository Link

trpc/trpc@70acdd4

Repro Steps

  1. git clone https://github.com/trpc/trpc
  2. git checkout 70acdd489a71425fb4ee186704ecdd2944694b1b
  3. pnpm install
  4. pnpm build
  5. pnpm lint

Versions

package version
@typescript-eslint/eslint-plugin 5.47.0
@typescript-eslint/parser 5.47.0
@typescript-eslint/scope-manager 5.47.0
@typescript-eslint/typescript-estree 5.47.0
@typescript-eslint/type-utils 5.47.0
@typescript-eslint/utils 5.47.0

Metadata

Metadata

Labels

accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions