Skip to content

Bug: rc-v8 projectService option leads to default project errors when used with eslint-plugin-import #9223

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
fpapado opened this issue Jun 3, 2024 · 1 comment
Labels
bug Something isn't working locked due to age Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing. triage Waiting for team members to take a look

Comments

@fpapado
Copy link
Contributor

fpapado commented Jun 3, 2024

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

While trying out @typescript-eslint@rc-v8, with the projectService key and eslint-plugin-import, a number of unrelated files end up being included in the default project. This then leads to the "Too many files (>...) have matched the default project" error.

This has surfaced in the past, first in #8428, and then as a general issue in #8428.

The core issue is that the projectService key is not deleted in the relevant eslint-module-utils call-site., so files end up being parsed with the project service.

I'd be happy to contribute a PR, either for this specific key, or for the more general issue of exporting a utility to do the deletion.

I filed this as a separate issue, in case it helps tracking, but feel free to move it around 😇

Reproduction Repository Link

https://github.com/fpapado/typescript-eslint-v8-with-plugin-import

Repro Steps

  1. clone the repo
  2. pnpm install
  3. pnpm eslint .

Versions

package version
@typescript-eslint/eslint-plugin 8.0.0-alpha.25
@typescript-eslint/parser 8.0.0-alpha.25
@JoshuaKGoldberg
Copy link
Member

Indeed, eslint-plugin-import will need to remove the new projectService key from parserOptions too. This is similar to import-js/eslint-plugin-import#2962 -> import-js/eslint-plugin-import#2963. You'll want to file an issue over there.

Also, now that #8428 -> #9233 is merged, we export a nice withoutProjectParserOptions that projects can try to import and use. 🚀

Thanks for filing!

@JoshuaKGoldberg JoshuaKGoldberg closed this as not planned Won't fix, can't repro, duplicate, stale Jun 27, 2024
@github-actions github-actions bot added the locked due to age Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing. label Jul 5, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working locked due to age Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing. triage Waiting for team members to take a look
Projects
None yet
Development

No branches or pull requests

2 participants