Skip to content

Commit

Permalink
feat: Use recommended config of eslint-plugin-react-compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
jhnns committed Feb 4, 2025
1 parent 07d0f37 commit f42ac18
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
9 changes: 1 addition & 8 deletions eslint/rules/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,9 @@ export const react = [
"react-hooks/exhaustive-deps": "warn",
},
},
// There's currently no official recommended flat config for react-compiler.
// TODO: Use recommended config when it's available.
{
files,
plugins: {
"react-compiler": reactCompilerPlugin,
},
rules: {
"react-compiler/react-compiler": "error",
},
...reactCompilerPlugin.configs.recommended,
},
{
files,
Expand Down
6 changes: 5 additions & 1 deletion eslint/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ declare module "eslint-plugin-react-compiler" {
rules: { [name: string]: any };
};

export default config;
export default {
configs: {
recommended: config,
},
};
}

declare module "eslint-plugin-react-hooks" {
Expand Down

0 comments on commit f42ac18

Please sign in to comment.