eslint-community / eslint-plugin-eslint-comments

Additional ESLint rules for directive comments of ESLint.
https://eslint-community.github.io/eslint-plugin-eslint-comments
MIT License
44 stars 6 forks source link

Rule proposal: disallow disabling of errors #184

Open 20manas opened 4 months ago

20manas commented 4 months ago

This rule can be optional. It will prevent disabling of all eslint rules which are errors. So only warnings can be disabled.

Reasoning

In a project, if some rules are set as errors, the intention is that those errors should always be handled and the situations which cause those errors should never occur. However, if somes rules are set as warnings, they can be ignored (and hence disabled). Thus it makes sense that only warnings should be allowed to be disabled.

This can also speed up code reviews as a reviewer can be certain that no crucial rule has been disabled.