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-config] eslint-bulk-suppressions causes excessive file system calls #5006

Open
dmichon-msft opened this issue Nov 18, 2024 · 0 comments

Comments

@dmichon-msft
Copy link
Contributor

Summary

Enabling the eslint-bulk-suppressions patch slows down eslint substantially by introducing many file system accesses during linter execution. Lint rule execution should ideally not touch the file system once the source file has been read.

Repro steps

Enable the eslint-bulk-suppressions patch, run linting.

Expected result:
Exactly one file system access from the feature, to read the .eslint-bulk-suppressions.json file from a known computed path.

Actual result:
For every unique directory containing a file being linted, the eslint-bulk-suppressions patch probes the file system looking for .eslintrc.cjs or .eslintrc.js files.

Details

Considering that the eslint-bulk-suppressions patch is applied by invoking it from the project's .eslintrc.js file, it should be trivial to either pass in __filename to a function returned from the patch object, or else read the path to the .eslintrc.js file from the NodeJS require stack.

Standard questions

Please answer these questions to help us investigate your issue more quickly:

Question Answer
@rushstack/eslint-config version? 1.10.4
Operating system? Linux
Would you consider contributing a PR? Yes
TypeScript compiler version? 5.3.3
Node.js version (node -v)? 18.19.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs triage
Development

No branches or pull requests

1 participant