1
1
import js from "@eslint/js" ;
2
2
import globals from "globals" ;
3
+ import react from "eslint-plugin-react" ;
3
4
import reactHooks from "eslint-plugin-react-hooks" ;
4
5
import reactRefresh from "eslint-plugin-react-refresh" ;
5
6
import tseslint from "typescript-eslint" ;
@@ -17,15 +18,20 @@ export default tseslint.config(
17
18
ecmaVersion : 2020 ,
18
19
globals : globals . browser ,
19
20
parserOptions : {
21
+ ...react . configs . flat . recommended . languageOptions ,
20
22
project : [ "./tsconfig.node.json" , "./tsconfig.app.json" ] ,
21
23
tsconfigRootDir : import . meta. dirname ,
22
24
} ,
23
25
} ,
26
+ settings : { react : { version : "detect" } } ,
24
27
plugins : {
28
+ react,
25
29
"react-hooks" : reactHooks ,
26
30
"react-refresh" : reactRefresh ,
27
31
} ,
28
32
rules : {
33
+ ...react . configs . recommended . rules ,
34
+ ...react . configs [ "jsx-runtime" ] . rules ,
29
35
...reactHooks . configs . recommended . rules ,
30
36
"@typescript-eslint/dot-notation" : [ "error" , { allowIndexSignaturePropertyAccess : true } ] ,
31
37
"@typescript-eslint/no-confusing-void-expression" : [ "error" , { ignoreArrowShorthand : true } ] ,
0 commit comments