eslint-plugin-eslint-comments icon indicating copy to clipboard operation
eslint-plugin-eslint-comments copied to clipboard

Allow providing an explanation message for no-restricted-disable

Open robatwilliams opened this issue 4 years ago • 2 comments

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."
}]

robatwilliams avatar Aug 13 '20 08:08 robatwilliams

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

MichaelDeBoey avatar Oct 14 '23 15:10 MichaelDeBoey

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.

robatwilliams avatar Oct 14 '23 17:10 robatwilliams