mysticatea / eslint-plugin-eslint-comments

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

Allow providing an explanation message for no-restricted-disable #52

Open robatwilliams opened 3 years ago

robatwilliams commented 3 years ago

It can be unclear to people why a rule should not be disabled. The only way to know is to look for a comment in the ESLint config where the rule is configured.

Unfortunately this can lead them to disabling that rule and no-restricted-disable itself:

// eslint-disable-next-line eslint-comments/no-restricted-disable
// eslint-disable-next-line some-rule

I propose that a message can be optionally provided, like https://eslint.org/docs/rules/no-restricted-imports allows:

"no-restricted-disable": ["error", {
    "name": "some-rule",
    "message": "Do not disable this, it has consequences XYZ. Do ABC instead."
}]
MichaelDeBoey commented 8 months ago

Hi @robatwilliams!

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

robatwilliams commented 8 months ago

Thanks for letting me know. I've now raised it there and linked.

There might be some important issues among the 33 open ones on this repo, I hope they don't get lost if their reporters are no longer active/diligent to re-open them.