@@ -3,26 +3,21 @@ import globals from "globals";
33import reactHooks from "eslint-plugin-react-hooks" ;
44import reactRefresh from "eslint-plugin-react-refresh" ;
55import tseslint from "typescript-eslint" ;
6+ import { defineConfig , globalIgnores } from "eslint/config" ;
67
7- export default tseslint . config (
8- { ignores : [ "dist" , "src/lib/json-parser" , "src/components/ui" ] } ,
8+ export default defineConfig ( [
9+ globalIgnores ( [ "dist" , "src/lib/json-parser" , "src/components/ui" ] ) ,
910 {
10- extends : [ js . configs . recommended , ...tseslint . configs . recommended ] ,
1111 files : [ "**/*.{ts,tsx}" ] ,
12+ extends : [
13+ js . configs . recommended ,
14+ tseslint . configs . recommended ,
15+ reactHooks . configs [ "recommended-latest" ] ,
16+ reactRefresh . configs . vite ,
17+ ] ,
1218 languageOptions : {
1319 ecmaVersion : 2020 ,
1420 globals : globals . browser ,
1521 } ,
16- plugins : {
17- "react-hooks" : reactHooks ,
18- "react-refresh" : reactRefresh ,
19- } ,
20- rules : {
21- ...reactHooks . configs . recommended . rules ,
22- "react-refresh/only-export-components" : [
23- "warn" ,
24- { allowConstantExport : true } ,
25- ] ,
26- } ,
27- }
28- ) ;
22+ } ,
23+ ] ) ;
0 commit comments