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

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

Open mmkal opened this issue 4 years ago • 1 comments

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.

mmkal avatar Apr 06 '20 22:04 mmkal

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

MichaelDeBoey avatar Oct 14 '23 15:10 MichaelDeBoey