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

no-restricted-disable - whitelist/blacklist based on error level #37

Open mmkal opened 4 years ago

mmkal commented 4 years ago

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.

MichaelDeBoey commented 8 months ago

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