11import js from '@eslint/js' ;
22import tseslint from '@typescript-eslint/eslint-plugin' ;
33import tsparser from '@typescript-eslint/parser' ;
4+ // @ts -ignore - Plugin doesn't have proper ESLint 9 types yet
45import importPlugin from 'eslint-plugin-import' ;
6+ // @ts -ignore - Plugin doesn't have proper ESLint 9 types yet
57import prettier from 'eslint-plugin-prettier' ;
8+ // @ts -ignore - Plugin doesn't have proper ESLint 9 types yet
69import react from 'eslint-plugin-react' ;
10+ // @ts -ignore - Plugin doesn't have proper ESLint 9 types yet
711import reactHooks from 'eslint-plugin-react-hooks' ;
8- import prettierConfig from 'eslint-config-prettier' ;
9- import type { Linter } from 'eslint' ;
1012
11- const config : Linter . FlatConfig [ ] = [
13+ export default [
1214 js . configs . recommended ,
1315 {
1416 files : [ 'src/**/*.{js,jsx,ts,tsx}' ] ,
@@ -22,41 +24,16 @@ const config: Linter.FlatConfig[] = [
2224 } ,
2325 } ,
2426 globals : {
27+ // Only keep React global for JSX without explicit React imports
2528 React : 'writable' ,
26- console : 'readonly' ,
27- process : 'readonly' ,
28- Buffer : 'readonly' ,
29- __dirname : 'readonly' ,
30- __filename : 'readonly' ,
31- module : 'readonly' ,
32- require : 'readonly' ,
33- exports : 'readonly' ,
34- global : 'readonly' ,
35- window : 'readonly' ,
36- document : 'readonly' ,
37- navigator : 'readonly' ,
38- HTMLElement : 'readonly' ,
39- Element : 'readonly' ,
40- Node : 'readonly' ,
41- Event : 'readonly' ,
42- EventTarget : 'readonly' ,
43- jest : 'readonly' ,
44- describe : 'readonly' ,
45- it : 'readonly' ,
46- test : 'readonly' ,
47- expect : 'readonly' ,
48- beforeEach : 'readonly' ,
49- afterEach : 'readonly' ,
50- beforeAll : 'readonly' ,
51- afterAll : 'readonly' ,
5229 } ,
5330 } ,
5431 plugins : {
55- '@typescript-eslint' : tseslint as any ,
56- react : react as any ,
57- 'react-hooks' : reactHooks as any ,
58- import : importPlugin as any ,
59- prettier : prettier as any ,
32+ '@typescript-eslint' : tseslint ,
33+ react,
34+ 'react-hooks' : reactHooks ,
35+ import : importPlugin ,
36+ prettier,
6037 } ,
6138 settings : {
6239 react : {
@@ -109,5 +86,3 @@ const config: Linter.FlatConfig[] = [
10986 } ,
11087 } ,
11188] ;
112-
113- export default config ;
0 commit comments