When using the these two plugins together, it results in a type error due to seemingly using out-of-date type information for eslint@8.x.x.
In types/plugin.d.ts:
configs: {
recommended: Linter.FlatConfig<Linter.RulesRecord> & {
rules: Linter.RulesRecord;
};
'recommended-legacy': Linter.Config<Linter.RulesRecord, Linter.RulesRecord>;
};
FlatConfig
takes no template arguments and Config
only takes one.
If I build the eslint plugin from the source repo, it does seem to build the proper types for eslint@9, so not sure if the package published on npm is behind from the master.
configs: {
recommended: Linter.FlatConfig;
'recommended-legacy': Linter.LegacyConfig<Linter.RulesRecord, Linter.RulesRecord>;
};
A similar issue seems to have been previously reported here:
However, given the package.json, it seems that eslint@9 is intended to be supported at this point, so not sure what the issue is.