ESLint: Too many files
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
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.
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.
I've been seeing this too and applied the same
parserOptions.projectService.maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTINGsolution.Hoping someone can shed some light into this.
Where exactly does one have to set this?
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,
]
I'm not sure whether we need to do this or not because I don't have this issue regularly at all. So I think we'll just close this for now.