Skip to content

Commit

Permalink
fix(eslint): consume meta.defaultOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Dec 3, 2024
1 parent 1cf656d commit 1835b34
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/eslint/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ export function convertRule(
);
const emitter = createEmitter();

if (eslintRule.meta?.defaultOptions) {
for (let i = 0; i < eslintRule.meta.defaultOptions.length; i++) {
options[i] ??= eslintRule.meta.defaultOptions[i];
}
}

// @ts-expect-error
const ruleListeners = eslintRule.create({
settings: {},
Expand Down

0 comments on commit 1835b34

Please sign in to comment.