File tree Expand file tree Collapse file tree 6 files changed +244
-61
lines changed Expand file tree Collapse file tree 6 files changed +244
-61
lines changed Original file line number Diff line number Diff line change @@ -16,17 +16,41 @@ export default [
1616 } ,
1717 } ,
1818 globals : {
19- browser : true ,
20- es6 : true ,
21- node : true ,
22- jest : true ,
19+ // Browser globals
20+ window : 'readonly' ,
21+ document : 'readonly' ,
22+ HTMLElement : 'readonly' ,
23+ HTMLDivElement : 'readonly' ,
24+ DOMRect : 'readonly' ,
25+ console : 'readonly' ,
26+ global : 'readonly' ,
27+ // Jest globals
28+ describe : 'readonly' ,
29+ it : 'readonly' ,
30+ test : 'readonly' ,
31+ expect : 'readonly' ,
32+ beforeEach : 'readonly' ,
33+ afterEach : 'readonly' ,
34+ beforeAll : 'readonly' ,
35+ afterAll : 'readonly' ,
36+ jest : 'readonly' ,
37+ // React
38+ React : 'readonly' ,
2339 } ,
2440 } ,
2541 plugins : {
2642 '@typescript-eslint' : typescript ,
2743 } ,
2844 rules : {
2945 ...typescript . configs . recommended . rules ,
46+ // Relax some strict rules
47+ '@typescript-eslint/no-explicit-any' : 'warn' ,
48+ '@typescript-eslint/no-unused-vars' : 'warn' ,
49+ '@typescript-eslint/no-empty-object-type' : 'off' ,
50+ '@typescript-eslint/ban-ts-comment' : 'warn' ,
51+ 'no-undef' : 'off' , // TypeScript handles this
52+ 'no-empty' : 'warn' ,
53+ 'no-redeclare' : 'off' , // Jest globals conflict with built-ins
3054 } ,
3155 } ,
3256 {
Original file line number Diff line number Diff line change 11require ( '@testing-library/jest-dom' ) ;
2+
3+ // Mock ResizeObserver for tests
4+ global . ResizeObserver = jest . fn ( ) . mockImplementation ( ( ) => ( {
5+ observe : jest . fn ( ) ,
6+ unobserve : jest . fn ( ) ,
7+ disconnect : jest . fn ( ) ,
8+ } ) ) ;
Original file line number Diff line number Diff line change 3434 "test" : " jest --passWithNoTests" ,
3535 "test:coverage" : " jest --passWithNoTests --coverage" ,
3636 "prettier" : " prettier ./ --write" ,
37- "lint" : " echo 'Linting disabled during TSDOWN migration' " ,
37+ "lint" : " eslint src --ext .ts,.tsx " ,
3838 "prepare" : " tsdown" ,
3939 "size" : " size-limit" ,
4040 "analyze" : " size-limit --why" ,
8989 "license" : " MIT" ,
9090 "husky" : {
9191 "hooks" : {
92- "pre-commit" : " echo 'Linting disabled during TSDOWN migration' "
92+ "pre-commit" : " eslint src --ext .ts,.tsx "
9393 }
9494 },
9595 "prettier" : {
128128 "@types/jest" : " ^27.0.3" ,
129129 "@types/react" : " ^17.0.35" ,
130130 "@types/react-dom" : " ^17.0.11" ,
131+ "@typescript-eslint/eslint-plugin" : " ^8.44.1" ,
132+ "@typescript-eslint/parser" : " ^8.44.1" ,
131133 "babel-jest" : " ^27.5.1" ,
132134 "babel-loader" : " ^8.2.4" ,
133135 "css-loader" : " ^5.0.0" ,
136+ "eslint" : " ^9.36.0" ,
134137 "husky" : " ^7.0.4" ,
138+ "jest" : " ^30.1.3" ,
135139 "jest-environment-jsdom" : " ^29.7.0" ,
136140 "np" : " ^7.7.0" ,
137141 "postcss" : " ^8" ,
You can’t perform that action at this time.
0 commit comments