6.4.0
- Add @eslint-community/eslint-comments dependency (#26)
@eslint-community/eslint-comments can replace
eslint-plugin-bestpractices as it is a community-wide eslint plugin.
https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/
to see the rules.
The rule that specifically replaces the old
bestpractices/no-eslint-disable is require-description. It does
basically the same. The difference is that it only affects real
eslint-disable directives. For example, it doesn't affect // eslint-disable-next as that doesn't actually disable any linting rules.
See https://eslint.org/docs/latest/use/configure/rules.
The plugin adds its recommended rules automatically. Those rules are:
disable-enable-pair, no-aggregating-enable, no-duplicate-disable,
no-unlimited-disable, no-unused-disable, no-unused-enable. They are all
treated as errors. The only way to turn them off is to turn them off
individually as the plugin doesn't allow consumers to just get the
plugin and define which rules to turn on. I do think those rules are
nice to have though, so I think it is fine to keep them. I particularly
like the no-unlimited-disable to make developers be specific on what
they are disabling.
I updated the example test to do a common eslint disable directive
(eslint-disable-next-line) that actually disables a eslint rule on the
next line. This triggers both the
@eslint-community/eslint-comments/require-description and
@eslint-community/eslint-comments/no-unlimited-disable rules.