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

cache files (.eslintcache) on save #1844

Open
scarf005 opened this issue May 2, 2024 · 1 comment
Open

cache files (.eslintcache) on save #1844

scarf005 opened this issue May 2, 2024 · 1 comment
Labels
feature-request Request for new features or functionality
Milestone

Comments

@scarf005
Copy link

scarf005 commented May 2, 2024

previous issues: #1323, #1544

the plugin uses eslint.lintText which does not support caching on onType and onSave. would it be possible to use eslint.lintFiles on onSave instead? using cache could improve performance of eslint on pre-commit hooks (e.g husky and lint-staged) significantly.

i'm interested in opening a PR, however pointers on where to look at would be appreciated.

@dbaeumer
Copy link
Member

dbaeumer commented May 6, 2024

Actually, shouldn't be too hard. You get the information via the ConfigurationSettings#run and can use it when validating a file here:

const newOptions: CLIOptions = Object.assign(Object.create(null), settings.options);

@dbaeumer dbaeumer added the feature-request Request for new features or functionality label May 6, 2024
@dbaeumer dbaeumer added this to the Backlog milestone May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

2 participants