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

no-unused-disable is redundant #80

Open
CruseCtrl opened this issue Jan 23, 2024 · 3 comments
Open

no-unused-disable is redundant #80

CruseCtrl opened this issue Jan 23, 2024 · 3 comments

Comments

@CruseCtrl
Copy link

CruseCtrl commented Jan 23, 2024

In the docs it says

TIP
The eslint-comments/no-unused-disable rule has the same effect as --report-unused-disable-directives option. However, the eslint-comments/no-unused-disable rule is relatively useful since it can be configured in shareable configs.

While this is true, ESLint also provides the reportUnusedDisableDirectives config option, which can be configured in shareable configs: https://eslint.org/docs/latest/use/configure/rules#report-unused-eslint-disable-comments

And the default value of that option was changed to true a few weeks ago, so will probably be included as a default setting with ESLint v9: eslint/eslint#17879

I propose that no-unused-disable should be deprecated, and removed in a future release

@CruseCtrl
Copy link
Author

CruseCtrl commented Jan 23, 2024

Here's the link to the ESLint v9 docs: https://eslint.org/docs/next/use/configure/configuration-files#reporting-unused-disable-directives

This setting defaults to "warn".

It also has auto-fix, so running eslint --fix will automatically remove any unused disable directives by default in ESLint v9

@MichaelDeBoey
Copy link

Hi @CruseCtrl!

Since this repo is unmaintained, you might want to re-open this issue in the @eslint-community fork https://github.com/eslint-community/eslint-plugin-eslint-comments

For more info about why we created this organization, you can read https://eslint.org/blog/2023/03/announcing-eslint-community-org

@CruseCtrl
Copy link
Author

Thanks, I didn't realise this was unmaintained. I'll maybe raise an issue on the forked one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants