@@ -2,7 +2,7 @@ import { fixupPluginRules } from "@eslint/compat";
2
2
import { FlatCompat } from "@eslint/eslintrc" ;
3
3
import js from "@eslint/js" ;
4
4
import globals from "globals" ;
5
- import reactPlugin from ' eslint-plugin-react' ;
5
+ import reactPlugin from " eslint-plugin-react" ;
6
6
import reactHooks from "eslint-plugin-react-hooks" ;
7
7
import reactRefresh from "eslint-plugin-react-refresh" ;
8
8
import tseslint from "typescript-eslint" ;
@@ -49,46 +49,55 @@ export default tseslint.config(
49
49
alwaysTryTypes : true ,
50
50
} ,
51
51
} ,
52
+ react : {
53
+ version : "detect" ,
54
+ } ,
52
55
} ,
53
56
rules : {
54
57
...reactHooks . configs . recommended . rules ,
55
58
"@typescript-eslint/no-empty-object-type" : "off" ,
56
- "@typescript-eslint/no-unused-vars" : [ "error" , {
57
- "argsIgnorePattern" : "^_" ,
58
- "varsIgnorePattern" : "^_" ,
59
- "caughtErrorsIgnorePattern" : "^_"
60
- } ] ,
61
- "import/order" : [ "error" , {
62
- "groups" : [
63
- "builtin" ,
64
- "external" ,
65
- "internal" ,
66
- [ "parent" , "sibling" ] ,
67
- "index" ,
68
- "object" ,
69
- "type" ,
70
- "unknown"
71
- ] ,
72
- "pathGroups" : [
73
- {
74
- "pattern" : "@*" ,
75
- "group" : "internal" ,
76
- "position" : "after"
77
- }
78
- ] ,
79
- "pathGroupsExcludedImportTypes" : [ "builtin" , "internal" ] ,
80
- "newlines-between" : "always" ,
81
- "alphabetize" : {
82
- "order" : "asc" ,
83
- "caseInsensitive" : true
84
- }
85
- } ] ,
59
+ "@typescript-eslint/no-unused-vars" : [
60
+ "error" ,
61
+ {
62
+ argsIgnorePattern : "^_" ,
63
+ varsIgnorePattern : "^_" ,
64
+ caughtErrorsIgnorePattern : "^_" ,
65
+ } ,
66
+ ] ,
67
+ "import/order" : [
68
+ "error" ,
69
+ {
70
+ groups : [
71
+ "builtin" ,
72
+ "external" ,
73
+ "internal" ,
74
+ [ "parent" , "sibling" ] ,
75
+ "index" ,
76
+ "object" ,
77
+ "type" ,
78
+ "unknown" ,
79
+ ] ,
80
+ pathGroups : [
81
+ {
82
+ pattern : "@*" ,
83
+ group : "internal" ,
84
+ position : "after" ,
85
+ } ,
86
+ ] ,
87
+ pathGroupsExcludedImportTypes : [ "builtin" , "internal" ] ,
88
+ "newlines-between" : "always" ,
89
+ alphabetize : {
90
+ order : "asc" ,
91
+ caseInsensitive : true ,
92
+ } ,
93
+ } ,
94
+ ] ,
86
95
"react/react-in-jsx-scope" : "off" ,
87
96
"react-refresh/only-export-components" : [
88
97
"warn" ,
89
98
{ allowConstantExport : true } ,
90
99
] ,
91
- " semi" : [ "error" , "always" ] ,
100
+ semi : [ "error" , "always" ] ,
92
101
} ,
93
102
}
94
103
) ;
0 commit comments