@@ -15,15 +15,15 @@ if (!process.features.typescript) {
1515import path from "node:path" ;
1616import { fileURLToPath } from "node:url" ;
1717
18- import { fixupConfigRules , fixupPluginRules } from "@eslint/compat" ;
18+ import { fixupPluginRules } from "@eslint/compat" ;
1919import { FlatCompat } from "@eslint/eslintrc" ;
2020import js from "@eslint/js" ;
2121import typescriptEslint from "@typescript-eslint/eslint-plugin" ;
2222import tsParser from "@typescript-eslint/parser" ;
2323import _import from "eslint-plugin-import" ;
2424import * as mdx from "eslint-plugin-mdx" ;
25- import reactCompiler from "eslint-plugin-react-compiler" ;
2625import globals from "globals" ;
26+ import reactHooks from "eslint-plugin-react-hooks" ;
2727
2828import localRules from "./eslint-local-rules/index.mjs" ;
2929
@@ -143,19 +143,16 @@ export default [
143143 ] ,
144144 } ,
145145 } ,
146- ...fixupConfigRules ( compat . extends ( "plugin:react-hooks/recommended" ) ) . map (
147- ( config ) => ( {
148- ...config ,
149- files : [ "**/*.ts" , "**/*.tsx" ] ,
150- ignores : [ "**/__tests__/**/*.*" , "**/*.d.ts" ] ,
151- } )
152- ) ,
146+ {
147+ ...reactHooks . configs . flat . recommended ,
148+ files : [ "src/react/**/*.ts" , "src/react/**/*.tsx" ] ,
149+ ignores : [ "**/__tests__/**/*.*" , "**/*.d.ts" ] ,
150+ } ,
153151 {
154152 files : [ "**/*.ts" , "**/*.tsx" ] ,
155153 ignores : [ "**/__tests__/**/*.*" , "**/*.d.ts" ] ,
156154
157155 plugins : {
158- "react-compiler" : reactCompiler ,
159156 ...tsPlugins ,
160157 } ,
161158
@@ -178,7 +175,6 @@ export default [
178175
179176 // rules for source files, but no tests
180177 rules : {
181- "react-compiler/react-compiler" : "error" ,
182178 "@typescript-eslint/consistent-type-exports" : [ "error" ] ,
183179 "@typescript-eslint/no-import-type-side-effects" : "error" ,
184180 "@typescript-eslint/no-restricted-types" : [
0 commit comments