1+ module . exports = {
2+ extends : [
3+ 'react-app' ,
4+ 'react-app/jest'
5+ ] ,
6+ parserOptions : {
7+ project : './tsconfig.json' ,
8+ tsconfigRootDir : __dirname ,
9+ warnOnUnsupportedTypeScriptVersion : false // Suppress TypeScript version warnings
10+ } ,
11+ rules : {
12+ // TypeScript rules - make them warnings instead of errors
13+ '@typescript-eslint/no-explicit-any' : 'warn' ,
14+ '@typescript-eslint/explicit-function-return-type' : 'off' ,
15+ '@typescript-eslint/explicit-module-boundary-types' : 'off' ,
16+ '@typescript-eslint/no-unused-vars' : [ 'warn' , { 'vars' : 'all' , 'args' : 'after-used' , 'ignoreRestSiblings' : true } ] ,
17+ '@typescript-eslint/no-use-before-define' : 'warn' ,
18+ '@typescript-eslint/no-useless-constructor' : 'warn' ,
19+
20+ // React Hook rules - make them warnings
21+ 'react-hooks/exhaustive-deps' : 'warn' ,
22+
23+ // General JS rules
24+ 'eqeqeq' : [ 'warn' , 'always' ] ,
25+ 'no-empty-pattern' : 'warn' ,
26+ 'no-useless-escape' : 'warn' ,
27+
28+ // Testing Library rules - make critical ones errors, others warnings
29+ 'testing-library/no-wait-for-multiple-assertions' : 'warn' ,
30+ 'testing-library/no-node-access' : 'warn' , // Made this a warning instead of error
31+
32+ // Turn off some overly strict rules
33+ 'no-console' : 'off' ,
34+ '@typescript-eslint/ban-ts-comment' : 'off'
35+ } ,
36+ overrides : [
37+ {
38+ files : [ '**/__tests__/**/*' , '**/*.{test,spec}.*' ] ,
39+ rules : {
40+ // Relax rules for test files
41+ '@typescript-eslint/no-explicit-any' : 'off' ,
42+ '@typescript-eslint/no-unused-vars' : 'off' ,
43+ 'testing-library/no-node-access' : 'off' // Allow direct node access in tests if needed
44+ }
45+ }
46+ ] ,
47+ ignorePatterns : [
48+ 'vite.config.ts' ,
49+ ] ,
50+ } ;
0 commit comments