eslint-plugin-eslint-comments
eslint-plugin-eslint-comments copied to clipboard
no-restricted-disable - whitelist/blacklist based on error level
From the docs for no-restricted-disable, it doesn't look like it's possible to do something like this:
{
"eslint-comments/no-restricted-disable": ["warn", { "level": "error" }]
}
This would allow disabling warnings, but not errors (in the above setup, no-restricted-disable
itself is a warning, so errors could still be disabled in exceptional circumstances, but we'd be forced to be very explicit, with something like
// eslint-disable-next-line eslint-comments/no-restricted-disable
// eslint-disable-next-line no-undef
console.log(someUndefinedVariable)
This would make the difference between warnings and errors meaningful in setups that use --max-warnings 0
.
Hi @mmkal!
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