Skip to content

feat!: flexible config + default reporting of unused disable directives - #100

Merged
mdjermanovic merged 14 commits into
eslint:mainfrom
bmish:unused-disable-directive-config
Jul 21, 2023
Merged

mdjermanovic merged 14 commits into
eslint:mainfrom
bmish:unused-disable-directive-config

Conversation

@bmish

@bmish bmish commented Dec 9, 2022 •

Copy link
Copy Markdown
Member

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:

Other related issues:

@eslint-github-bot

Copy link
Copy Markdown

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.

  • The length of the commit message must be less than or equal to 72

To Fix: You can fix this problem by running git commit --amend, editing your commit message, and then running git push -f to update this pull request.

Read more about contributing to ESLint here

@bmish
bmish force-pushed the unused-disable-directive-config branch from 6783236 to c5b1c10 Compare December 9, 2022 19:01
@bmish bmish changed the title feat!: flexible configuration and stricter default behavior for reporting unused disable directives feat!: flexible config + default reporting of unused disable directives Dec 9, 2022
@bmish
bmish force-pushed the unused-disable-directive-config branch from c5b1c10 to 132158c Compare December 9, 2022 19:02
@nzakas nzakas added the Initial Commenting This RFC is in the initial feedback stage label Dec 9, 2022

@nzakas nzakas left a comment

Copy link
Copy Markdown
Member

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.

Comment thread designs/2022-unused-disable-directive-flexible-config/README.md Outdated
Comment thread designs/2022-unused-disable-directive-flexible-config/README.md Outdated
Comment thread designs/2022-unused-disable-directive-flexible-config/README.md Outdated
Comment thread designs/2022-unused-disable-directive-flexible-config/README.md Outdated
@bmish
bmish force-pushed the unused-disable-directive-config branch 3 times, most recently from 94ef555 to bb6df4e Compare December 29, 2022 18:06
Comment thread designs/2022-unused-disable-directive-flexible-config/README.md Outdated

@nzakas nzakas left a comment

Copy link
Copy Markdown
Member

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.

Comment thread designs/2022-unused-disable-directive-flexible-config/README.md Outdated
Comment thread designs/2022-unused-disable-directive-flexible-config/README.md Outdated
Comment thread designs/2022-unused-disable-directive-flexible-config/README.md Outdated
Comment thread designs/2022-unused-disable-directive-flexible-config/README.md Outdated
Comment thread designs/2022-unused-disable-directive-flexible-config/README.md Outdated
@nzakas

nzakas commented Mar 8, 2023

Copy link
Copy Markdown
Member

@bmish are you still working on this?

@nzakas

nzakas commented Apr 7, 2023

Copy link
Copy Markdown
Member

@bmish friendly ping. Do you intend to finish up this RFC?

@bmish

bmish commented Apr 10, 2023

Copy link
Copy Markdown
Member Author

Sorry for delay, will finish this up when I have a chance.

bmish and others added 7 commits May 21, 2023 10:42
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)
@bmish

bmish commented May 21, 2023

Copy link
Copy Markdown
Member Author

I have updated the RFC to incorporate all feedback so far.

@bmish

bmish commented May 23, 2023

Copy link
Copy Markdown
Member Author

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.

@bmish
bmish force-pushed the unused-disable-directive-config branch from 6a1d1ad to d8e3de7 Compare May 24, 2023 00:13
Comment thread designs/2022-unused-disable-directive-flexible-config/README.md Outdated
Comment thread designs/2022-unused-disable-directive-flexible-config/README.md Outdated

@nzakas nzakas left a comment

Copy link
Copy Markdown
Member

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

@mdjermanovic mdjermanovic left a comment

Copy link
Copy Markdown
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking feature Final Commenting This RFC is in the final week of commenting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants