Skip to content

Docs: clarify how to fix "Too many files (>8) have matched the default project" #9450

@JavaScriptBach

Description

@JavaScriptBach

Before You File a Documentation Request Please Confirm You Have Done The Following...

Suggested Changes

I have been unable to upgrade typescript-eslint past 7.5.0; doing so gives a "Too many files have matched the default project" whenever I try to lint.

My languageOptions are

languageOptions: {
    parser: tseslint.parser,
    parserOptions: {
      EXPERIMENTAL_useProjectService: true,
    },
  },

The error I'm getting:

common:lint: <redacted path>
common:lint:   0:0  error  Parsing error: Too many files (>8) have matched the default project.
common:lint: 
common:lint: Having many files run with the default project is known to cause performance issues and slow down linting.
common:lint: 
common:lint: See https://typescript-eslint.io/troubleshooting/typed-linting#allowdefaultprojectforfiles-glob-too-wide
common:lint: 
common:lint: Matching files:
common:lint: - /<redacted path>/node_modules/tinycolor2/esm/tinycolor.js
common:lint: - /<redacted path>/node_modules/date-fns/esm/endOfMonth/index.js
common:lint: - /<redacted path>/node_modules/date-fns/esm/lastDayOfMonth/index.js
common:lint: - /<redacted path>/node_modules/date-fns/esm/startOfDay/index.js
common:lint: - /<redacted path>/node_modules/date-fns/esm/startOfISOWeek/index.js
common:lint: - /<redacted path>/node_modules/date-fns/esm/startOfMonth/index.js
common:lint: - /<redacted path>/node_modules/date-fns/esm/subDays/index.js
common:lint: - /<redacted path>/node_modules/date-fns/esm/subMonths/index.js
common:lint: - /<redacted path>/node_modules/sinon/pkg/sinon-esm.js
common:lint: 
common:lint: If you absolutely need more files included, set parserOptions.EXPERIMENTAL_useProjectService.maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING to a larger value

I've read various issues and docs and none of them answer my question.

I'm certainly open to the possibility that something is wrong with my linting configuration, but I couldn't find anything in the docs to help me investigate this. (Are node_modules files supposed to be opened by typescript-eslint?)

From my perspective, it looks like a breaking change was released and it would be nice to at least clarify in the docs how folks with a previously working v7 config can upgrade.

Affected URL(s)

https://typescript-eslint.io/troubleshooting/typed-linting/#i-get-errors-telling-me-having-many-files-run-with-the-default-project-is-known-to-cause-performance-issues-and-slow-down-linting

Metadata

Metadata

Labels

documentationDocumentation ("docs") that needs adding/updatinglocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.team assignedA member of the typescript-eslint team should work on this.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions