mysticatea / eslint-plugin-eslint-comments

Additional ESLint rules for directive comments of ESLint.
https://mysticatea.github.io/eslint-plugin-eslint-comments/
MIT License
361 stars 46 forks source link

no-unused-disable is redundant #80

Open CruseCtrl opened 10 months ago

CruseCtrl commented 10 months ago

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: https://github.com/eslint/eslint/pull/17879

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

CruseCtrl commented 10 months ago

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 commented 10 months ago

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 commented 10 months ago

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