Skip to content
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

ESLint: Too many files #804

Open
braginteractive opened this issue Jul 25, 2024 · 4 comments
Open

ESLint: Too many files #804

braginteractive opened this issue Jul 25, 2024 · 4 comments

Comments

@braginteractive
Copy link
Contributor

braginteractive commented Jul 25, 2024

Have been working with epic stack for a bit now without any custom configs to ESLint.

The following error showed up today:

Parsing error: Too many files (>8) have matched the default project.

Having many files run with the default project is known to cause performance issues and slow down linting.

See https://typescript-eslint.io/troubleshooting/#allowdefaultproject-glob-too-wide

As of now, my workaround has been to add the following to the eslint.config.js file:

parserOptions.projectService.maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING

@kentcdodds
Copy link
Member

I've seen this in the editor, but not when running the CLI. I'm not sure what is incorrectly configured, but I'd love to find out how to properly handle this.

@andrecasal
Copy link
Contributor

I've been seeing this too and applied the same parserOptions.projectService.maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING solution.

Hoping someone can shed some light into this.

@MoSattler
Copy link
Contributor

I've been seeing this too and applied the same parserOptions.projectService.maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING solution.

Hoping someone can shed some light into this.

Where exactly does one have to set this?

@braginteractive
Copy link
Contributor Author

Goes in your eslint.config.js file.

Mine looks like the following as of now:

import { default as defaultConfig } from '@epic-web/config/eslint'

/** @type {import("eslint").Linter.Config} */
export default [
	...defaultConfig,
	// add custom config objects here:
	parserOptions.projectService
		.maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING,
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants