-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Bug: "Too many files (>8) have matched the default project" error triggers on every file after 8 #9032
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
Workaround: Set {
parserOptions: {
EXPERIMENTAL_useProjectService: {
maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING: Infinity,
},
},
} (but note that |
Un-assigning from myself as I'm on vacation and then conference-traveling this month, and won't have time to investigate. If anybody would like to dive into the code to investigate then please do!
As mentioned, #8925 is the PR that added these new code paths. That PR touches the relevant files in |
I've updated the reproduction to |
Looking at the code, I think the problem might be here:
It unconditionally does defaultProjectMatchedFiles.add(filePathAbsolute); so every file will be considered as matching the default project. If I understand the code correctly, it should be checking against if (!opened.configFileName) {
defaultProjectMatchedFiles.add(filePathAbsolute);
} I've tried adding that check locally and no longer get the warnings (but I haven't checked to see if files that actually don't have a project still trigger it). |
@ehoogeveen-medweb excellent find, thanks for pointing this out! Are you up for sending a PR to fix this? 😁 |
Technically I think the old title was more accurate if my diagnosis is correct, as it's in-project files getting reported as out-of-project files 😁 I'll try to put together a pull request. |
Haha fair point! |
Before You File a Bug Report Please Confirm You Have Done The Following...
Issue Description
Split out from #8925 as I realized you requested an issue. As the title says, this error seems to trigger for every file after the 8th. With 9 files I get the error once, with 10 files I get the error twice, etc.
Reproduction Repository Link
https://github.com/ehoogeveen-medweb/glob-too-wide.git
Repro Steps
npm ci
npx eslint --ext ts .
Versions
typescript-eslint
7.8.0
TypeScript
5.4.5
ESLint
8.57.0
node
20.12.2
The text was updated successfully, but these errors were encountered: