Warn on deprecated rules
See original GitHub issueAs of v3.8.1, ESLint has a number of deprecated rules:
These rules are marked as deprecated
in meta
.
However, there’s no easy way for users to know that these rules are deprecated without explicitly following ESLint development.
There is a capacity for warning about the use of rules that were previously removed and replaced by other rules, but this only applies to first-party rules, and only to ones that have actually been removed: https://github.com/eslint/eslint/blob/v3.8.1/lib/eslint.js#L818-L827
I believe it would be helpful to check ruleCreator.meta.deprecated
at that location, then emit a warning if that rule is deprecated.
This would be helpful for third-party plugins as well; the impetus for this is my wanting to deprecate some rules in eslint-plugin-babel that now have their functionality covered by rules in ESLint proper.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:7
- Comments:33 (33 by maintainers)
Top GitHub Comments
It looks like the resolution is to expose deprecated rules in the Node API, but not change the CLI output for now, so this isn’t a breaking change. I’ll remove it from the 4.0 project.
@vitorbal Option “B”, proposed by @mysticatea completely bypasses warning and error mechanics of reporting. So it will not affect CIs in any way. @platinumazure We can’t really do that. Major version is not an excuse to break every dependency we have. If there is no other way around - we can break third-party formatters, but I would want to first exhaust other options.