Skip to content

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

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

Closed
4 tasks done
JoshuaKGoldberg opened this issue Dec 30, 2022 · 2 comments · Fixed by #6491
Closed
4 tasks done
Assignees
Labels
accepting prs Go ahead, send a pull request that resolves this issue bug Something isn't working

Comments

@JoshuaKGoldberg
Copy link
Member

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
@JoshuaKGoldberg JoshuaKGoldberg added bug Something isn't working triage Waiting for team members to take a look labels Dec 30, 2022
@JoshuaKGoldberg JoshuaKGoldberg changed the title Bug: <short description of the issue> Bug: Excess <tsconfigRootDir>/../../... before parserOptions.project complaints Dec 30, 2022
@bradzacher
Copy link
Member

I had a fix for this in one of my v6 PRs I think.

@JoshuaKGoldberg JoshuaKGoldberg added accepting prs Go ahead, send a pull request that resolves this issue and removed triage Waiting for team members to take a look labels Jan 22, 2023
@JoshuaKGoldberg
Copy link
Member Author

I keep seeing this come up. Latest example is in the ESLint Discord: https://discord.com/channels/688543509199716507/688543520482394192/1076198127775797278

@JoshuaKGoldberg JoshuaKGoldberg self-assigned this Feb 19, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepting prs Go ahead, send a pull request that resolves this issue bug Something isn't working
Projects
None yet
2 participants