eslint-plugin-eslint-comments
eslint-plugin-eslint-comments copied to clipboard
Allow providing an explanation message for no-restricted-disable
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."
}]
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
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.