Skip to content

Commit 1836b46

Browse files
authored
[compiler] Have react-compiler eslint plugin return a RuleModule (facebook#34421)
Eslint is expecting a map of [string] => RuleModule. Before we were passing {rule: RuleModule, severity: ErrorSeverity} which was breaking legacy Eslint configurations
1 parent eec50b1 commit 1836b46

File tree

1 file changed

+5
-1
lines changed
  • compiler/packages/eslint-plugin-react-compiler/src

1 file changed

+5
-1
lines changed

compiler/packages/eslint-plugin-react-compiler/src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,8 @@ const configs = {
3434
},
3535
};
3636

37-
export {configs, allRules as rules, meta};
37+
const rules = Object.fromEntries(
38+
Object.entries(allRules).map(([name, {rule}]) => [name, rule]),
39+
);
40+
41+
export {configs, rules, meta};

0 commit comments

Comments
 (0)