Skip to content
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

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

Open
robatwilliams opened this issue Aug 13, 2020 · 2 comments
Open

Comments

@robatwilliams
Copy link

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
Copy link

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants