-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
feat: Introduce a way to suppress violations #19159
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
feat: Introduce a way to suppress violations #19159
Conversation
✅ Deploy Preview for docs-eslint canceled.
|
@softius thanks for getting this started. As a note: we don't review draft PRs, so when you're ready for feedback, go ahead and click "Ready for review". |
23b4d22
to
a2a126b
Compare
@nzakas is there a way to rerun the failing check for the browser tests? It doesn't seem related to this PR. |
@softius the browser test is failing most of the times, that's not a problem with your PR. Please, disregard failures in that test until the problem is fixed. |
@nzakas @fasttime apart from the changes discussed in the related at the RFC, I did the following changes:
Point 3 is an overkill and error prone, I would prefer to export |
Hi everyone, it looks like we lost track of this pull request. Please review and see what the next steps are. This pull request will auto-close in 7 days without an update. |
Sorry for the late reply.
I agree it makes sense to display the message about pruning after the formatter output.
Not sure if this is necessary. If the fixes and the unused suppressions belong to different rules or different files, it's probably better to handle them separately.
All counts need to be all adjusted. It's fine to export |
Hi everyone, it looks like we lost track of this pull request. Please review and see what the next steps are. This pull request will auto-close in 7 days without an update. |
6e27104
to
8a707f1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice work on all of this. I left a few comments throughout, mostly for a bit of cleanup and aligning with the project standards.
Thank you @nzakas ! I went through your feedback and adjusted accordingly. Everything should be there now, please advise otherwise. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good. Just a few bits of cleanup throughout.
Hi everyone, it looks like we lost track of this pull request. Please review and see what the next steps are. This pull request will auto-close in 7 days without an update. |
Not stale. This is pending a review. |
@eslint/eslint-tsc would appreciate some more reviews on this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code is looking really good now. I think the thing that's missing is a dedicate docs page that explains how to use this feature.
I'd put this under user/suppressions
maybe titled "Bulk Suppressions"? It should walk people through setting up suppressions, purging suppressions, etc. Can you take a look at adding that?
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
10dc59a
to
e1fb8d9
Compare
@trickpattyFH20 the scope of this PR is closed. If you have suggestions for how to improve things, please open a separate issue. Regarding VS Code - right now, this is a CLI-only feature, and that's okay. It's a big feature that we need to land and get feedback on before we start thinking through additional use cases. (Again, feel free to open an issue about this. Keep in mind that we don't actually maintain the ESLint VS Code extension, though, so our role would be to ensure access to this feature via some API.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Nice work @softius! Would you be interested in writing an introductory blog post for the ESLint blog about this feature? We can publish it along with the next release. |
@nzakas absolutely! Please point me to the right direction and I will prepare the blog. Is this for "News and Updates" section? |
Yes. Check out the README here: |
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[x] Add something to the core
[ ] Other, please explain:
What changes did you make? (Give an overview)
This pull request implements the suppress violations feature as outlined in the approved RFC.
Is there anything you'd like reviewers to focus on?