-
-
Notifications
You must be signed in to change notification settings - Fork 70
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!: flexible config + default reporting of unused disable directives #100
feat!: flexible config + default reporting of unused disable directives #100
Conversation
Hi @bmish!, thanks for the Pull Request The first commit message isn't properly formatted. We ask that you update the message to match this format, as we use it to generate changelogs and automate releases.
To Fix: You can fix this problem by running Read more about contributing to ESLint here |
6783236
to
c5b1c10
Compare
c5b1c10
to
132158c
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.
Thanks for putting this together. Overall, I think have the option on by default makes sense, but I think this plan is a bit too disruptive as described. I think we can make it less disruptive by continuing to support boolean settings forever and by having the default be warn
instead of error
.
designs/2022-unused-disable-directive-flexible-config/README.md
Outdated
Show resolved
Hide resolved
designs/2022-unused-disable-directive-flexible-config/README.md
Outdated
Show resolved
Hide resolved
designs/2022-unused-disable-directive-flexible-config/README.md
Outdated
Show resolved
Hide resolved
designs/2022-unused-disable-directive-flexible-config/README.md
Outdated
Show resolved
Hide resolved
94ef555
to
bb6df4e
Compare
bb6df4e
to
37c78bf
Compare
designs/2022-unused-disable-directive-flexible-config/README.md
Outdated
Show resolved
Hide resolved
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.
It seems like we've come to a pretty good agreement about how to proceed here. We just need the RFC to be updated to reflect that agreement along with some other small points of clarification.
designs/2022-unused-disable-directive-flexible-config/README.md
Outdated
Show resolved
Hide resolved
designs/2022-unused-disable-directive-flexible-config/README.md
Outdated
Show resolved
Hide resolved
designs/2022-unused-disable-directive-flexible-config/README.md
Outdated
Show resolved
Hide resolved
designs/2022-unused-disable-directive-flexible-config/README.md
Outdated
Show resolved
Hide resolved
designs/2022-unused-disable-directive-flexible-config/README.md
Outdated
Show resolved
Hide resolved
@bmish are you still working on this? |
@bmish friendly ping. Do you intend to finish up this RFC? |
Sorry for delay, will finish this up when I have a chance. |
Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
* main: chore: Add Mastodon status post to workflow (eslint#110) feat: ESLint Language Plugins (eslint#99) feat: support for testing invalid rule schemas and runtime exceptions (eslint#103) feat!: check for parsing errors in suggestion fixes (eslint#101)
I have updated the RFC to incorporate all feedback so far. |
595e34e
to
6a1d1ad
Compare
I have opened up a draft PR of phase 1 (the non-breaking changes) from this RFC. It's fully working, tested, and documented, so this helps prove out the RFC and demonstrates what changes will be necessary. |
6a1d1ad
to
d8e3de7
Compare
designs/2022-unused-disable-directive-flexible-config/README.md
Outdated
Show resolved
Hide resolved
designs/2022-unused-disable-directive-flexible-config/README.md
Outdated
Show resolved
Hide resolved
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. I feel comfortable with this direction
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! Moving to final commenting.
Summary
Provide users with more flexible, intuitive control over how unused disable directives are reported by supporting severity levels instead of just boolean values with CLI and config file options. Change the default behavior from off to warn on unused disable directives.
Related Issues
Draft implementation of phase 1 of this RFC (the non-breaking changes):
The issue triggering this RFC:
reportUnusedDisableDirectives
config option by default eslint#15466 - the issue triggering this RFCOther related issues:
reportUnusedDisableDirectives
in config files eslint#9382 - similar earlier proposal withreportUnusedDisableDirectives
accepting a severity levelreportUnusedDisableDirectives
in config files