I think I just missed the boat for a major release, but I just wanted to clarify how deprecated rules are handled in this plugin.
Currently the "all" config includes all rules in the rules directory, including deprecated rules that still exist in the source code.
const rulesDir = join(__dirname, 'rules');
const excludedFiles = ['__tests__', 'utils'];
const rules = readdirSync(rulesDir)
.map(rule => parse(rule).name)
.filter(rule => !excludedFiles.includes(rule))
.reduce<Record<string, RuleModule>>(
(acc, curr) => ({
...acc,
[curr]: importDefault(join(rulesDir, curr)) as RuleModule,
}),
{},
);
const allRules = Object.keys(rules).reduce<
Record<string, TSESLint.Linter.RuleLevel>
>((rules, key) => ({ ...rules, [`jest/${key}`]: 'error' }), {});
I thought that those deprecated rules might get removed in the next major release. Is that generally the case, or are they expected to remain indefinitely?
Would it make sense for allRules to filter on rule.meta.deprecated?
I think I just missed the boat for a major release, but I just wanted to clarify how deprecated rules are handled in this plugin.
Currently the "all" config includes all rules in the
rulesdirectory, including deprecated rules that still exist in the source code.I thought that those deprecated rules might get removed in the next major release. Is that generally the case, or are they expected to remain indefinitely?
Would it make sense for
allRulesto filter onrule.meta.deprecated?