Skip to content

Commit

Permalink
fix(plugin-eslint): handle mismatched slugs for legacy configs
Browse files Browse the repository at this point in the history
  • Loading branch information
matejchalk committed Dec 17, 2024
1 parent 87cd037 commit e324f39
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/plugin-eslint/src/lib/meta/versions/legacy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ export async function loadRulesForLegacyConfig({
if (entry == null || isRuleOff(entry)) {
return null;
}
const meta = rulesMeta[id];
if (!meta) {
const ruleMeta = rulesMeta[id];
if (!ruleMeta) {
ui().logger.warning(`Metadata not found for ESLint rule ${id}`);
return null;
}
// ignoring meta.defaultOptions to match legacy config handling in calculateConfigForFile
const { defaultOptions: _, ...meta } = ruleMeta;
const options = optionsFromRuleEntry(entry);
return { id, meta, options };
})
Expand Down

0 comments on commit e324f39

Please sign in to comment.