-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
#249
Comments
Idk if that still true, but in #234 (comment) I mentioned that the ESLint option "Doesn't seem to be picked up by extending configurations". There's one use-case where it's still not fully redundant: Flagging without autofixes. Which is especially sensical with this rules as you may not want a "disable removal" to slip through unnoticed due to a bad configuration change. Using the https://www.npmjs.com/package/eslint-plugin-no-autofix plugin: '@eslint-community/eslint-comments/no-unused-disable': 'off',
'no-autofix/@eslint-community/eslint-comments/no-unused-disable': 'error', In VSCode settings: "eslint.codeActionsOnSave.rules": [
// Clearing imports, unused vars and comments because of commented code while testing is annoying
...
"!@eslint-community/eslint-comments/no-unused-disable",
"*"
], There is a RFC to obsolete
The RFC currently doesn't even mention However, this rule is currently broken on flat-configs anyway, unfortunately |
Eslint already has the
reportUnusedDisableDirectives
setting, and starting in eslint v9, that setting is enabled by default: https://eslint.org/docs/latest/use/configure/rules#report-unused-eslint-disable-commentsIt also has auto-fix, so running
eslint --fix
will automatically remove any unused disable directives. I don't think theno-unused-disable
is adding anything extra, so it should be removed from this pluginThe text was updated successfully, but these errors were encountered: