feat: Implement api support for bulk-suppressions#20565
feat: Implement api support for bulk-suppressions#20565mdjermanovic merged 7 commits intoeslint:mainfrom
Conversation
✅ Deploy Preview for docs-eslint canceled.
|
|
Hi @adf0nt3s!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page. Read more about contributing to ESLint here |
|
Hi @adf0nt3s!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page. Read more about contributing to ESLint here |
2 similar comments
|
Hi @adf0nt3s!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page. Read more about contributing to ESLint here |
|
Hi @adf0nt3s!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page. Read more about contributing to ESLint here |
041fb41 to
9aa94f6
Compare
fasttime
left a comment
There was a problem hiding this comment.
Thanks for the pull request. I left some suggestions.
|
The note about circular deps aside, i've implemented the feedback 👍 |
fasttime
left a comment
There was a problem hiding this comment.
It would be good to have a test where suppressionsLocation is set to an absolute path.
b9dadea to
4c0367c
Compare
4c0367c to
b6379b9
Compare
tests/lib/eslint/eslint.js
Outdated
| ); | ||
| } finally { | ||
| // Clean up cache file | ||
| fs.rmSync(cacheLocation, { force: true }); |
There was a problem hiding this comment.
Not sure about this, let me know if there is a better optoin
There was a problem hiding this comment.
If we move this unit test into the testCacheWithConcurrency function, where the other cache-related tests are, then we can set cacheFilePath to some temporary directory, for example:
eslint/tests/lib/eslint/eslint.js
Line 13275 in a176319
and use that directory as a cacheLocation in the ESLint options. And then, when the test finishes, cacheLocation will be deleted automatically.
eslint/tests/lib/eslint/eslint.js
Lines 12878 to 12883 in a176319
Note: unit tests inside testCacheWithConcurrency should also pass the concurrency option, which is useful to test the cache handling in separate parts of the code.
tests/lib/eslint/eslint.js
Outdated
| ); | ||
| } finally { | ||
| // Clean up cache file | ||
| fs.rmSync(cacheLocation, { force: true }); |
There was a problem hiding this comment.
If we move this unit test into the testCacheWithConcurrency function, where the other cache-related tests are, then we can set cacheFilePath to some temporary directory, for example:
eslint/tests/lib/eslint/eslint.js
Line 13275 in a176319
and use that directory as a cacheLocation in the ESLint options. And then, when the test finishes, cacheLocation will be deleted automatically.
eslint/tests/lib/eslint/eslint.js
Lines 12878 to 12883 in a176319
Note: unit tests inside testCacheWithConcurrency should also pass the concurrency option, which is useful to test the cache handling in separate parts of the code.
Co-authored-by: Francesco Trotta <[email protected]>
Co-authored-by: Francesco Trotta <[email protected]>
8c2bfd2 to
74449e6
Compare
fasttime
left a comment
There was a problem hiding this comment.
LGTM, thanks! Leaving open for another review.
|
Excellent, thanks friends! |
Prerequisites checklist
AI acknowledgment
What is the purpose of this pull request? (put an "X" next to an item)
[x] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[x] Other, please explain: bulk suppression support for the Eslint API
What changes did you make? (Give an overview)
This implements API support for bulk suppressions, as outlined here eslint/rfcs#142
fixes #19603
Is there anything you'd like reviewers to focus on?