66// exhaustive deps, no-delete, no-accumulating-spread.
77// ESLint handles: everything below that requires AST traversal + type info.
88
9+ import { dirname } from 'path' ;
10+ import { fileURLToPath } from 'url' ;
911import js from '@eslint/js' ;
10- import tseslint from 'typescript-eslint' ;
1112import reactHooks from 'eslint-plugin-react-hooks' ;
1213import globals from 'globals' ;
13- import { fileURLToPath } from 'url' ;
14- import { dirname } from 'path' ;
14+ import tseslint from 'typescript-eslint' ;
1515
16- const __dirname = dirname ( fileURLToPath ( import . meta. url ) ) ;
16+ const Dirname = dirname ( fileURLToPath ( import . meta. url ) ) ;
1717
1818export default tseslint . config (
1919 // ── Ignore patterns ────────────────────────────────────────────────────────
@@ -29,6 +29,7 @@ export default tseslint.config(
2929 '**/*.config.{js,mjs,cjs,ts}' ,
3030 'next-env.d.ts' ,
3131 '.storybook/**' ,
32+ 'storybook-static/**' ,
3233 ] ,
3334 } ,
3435
@@ -48,7 +49,7 @@ export default tseslint.config(
4849 parserOptions : {
4950 // Type-aware rules (no-floating-promises, await-thenable, etc.)
5051 project : true ,
51- tsconfigRootDir : __dirname ,
52+ tsconfigRootDir : Dirname ,
5253 } ,
5354 } ,
5455 } ,
@@ -58,26 +59,27 @@ export default tseslint.config(
5859 rules : {
5960 // ── File / function size ─────────────────────────────────────────────
6061 // Fat files are a sign of missing module decomposition.
61- 'max-lines' : [ 'error ' , { max : 250 , skipBlankLines : true , skipComments : true } ] ,
62+ 'max-lines' : [ 'warn ' , { max : 250 , skipBlankLines : true , skipComments : true } ] ,
6263
6364 // 40 lines per function forces extraction into hooks and helpers.
6465 'max-lines-per-function' : [
65- 'error' ,
66+ 'warn' ,
67+ // biome-ignore lint/style/useNamingConvention: ESLint config property name
6668 { max : 40 , skipBlankLines : true , skipComments : true , IIFEs : true } ,
6769 ] ,
6870
6971 // More than 3 parameters is a sign of missing abstraction (use an options object).
70- 'max-params' : [ 'error ' , { max : 3 } ] ,
72+ 'max-params' : [ 'warn ' , { max : 3 } ] ,
7173
7274 // Nesting beyond 3 levels is unreadable; use early returns and helpers.
73- 'max-depth' : [ 'error ' , { max : 3 } ] ,
75+ 'max-depth' : [ 'warn ' , { max : 3 } ] ,
7476
7577 // Cyclomatic complexity — mirrors biome's cognitive complexity limit.
76- complexity : [ 'error ' , { max : 6 } ] ,
78+ complexity : [ 'warn ' , { max : 6 } ] ,
7779
7880 // ── Async discipline ─────────────────────────────────────────────────
7981 // await in a loop serializes parallel work; extract to Promise.all or a service.
80- 'no-await-in-loop' : 'error ' ,
82+ 'no-await-in-loop' : 'warn ' ,
8183
8284 // ── Console hygiene ──────────────────────────────────────────────────
8385 'no-console' : [ 'error' , { allow : [ 'warn' , 'error' , 'info' ] } ] ,
@@ -86,7 +88,7 @@ export default tseslint.config(
8688 // Every exported function must declare its return type explicitly.
8789 // This is the single most important rule Biome cannot enforce.
8890 '@typescript-eslint/explicit-function-return-type' : [
89- 'error ' ,
91+ 'warn ' ,
9092 {
9193 allowExpressions : true ,
9294 allowTypedFunctionExpressions : true ,
@@ -96,17 +98,17 @@ export default tseslint.config(
9698 ] ,
9799
98100 // Public API surface of modules must have explicit types.
99- '@typescript-eslint/explicit-module-boundary-types' : 'error ' ,
101+ '@typescript-eslint/explicit-module-boundary-types' : 'warn ' ,
100102
101103 // Floating promises are silent bugs — always handle or void explicitly.
102- '@typescript-eslint/no-floating-promises' : 'error ' ,
104+ '@typescript-eslint/no-floating-promises' : 'warn ' ,
103105
104106 // Awaiting a non-Promise is always a bug.
105107 '@typescript-eslint/await-thenable' : 'error' ,
106108
107109 // Misused promises (e.g. if (asyncFn()) {}) are silent bugs.
108110 '@typescript-eslint/no-misused-promises' : [
109- 'error ' ,
111+ 'warn ' ,
110112 { checksVoidReturn : { attributes : false } } ,
111113 ] ,
112114
@@ -118,7 +120,7 @@ export default tseslint.config(
118120
119121 // ── Unused code ──────────────────────────────────────────────────────
120122 '@typescript-eslint/no-unused-vars' : [
121- 'error ' ,
123+ 'warn ' ,
122124 { argsIgnorePattern : '^_' , varsIgnorePattern : '^_' } ,
123125 ] ,
124126
@@ -136,7 +138,7 @@ export default tseslint.config(
136138
137139 // Missing deps = stale closures = silent bugs.
138140 // (Biome also enforces this, belt-and-suspenders.)
139- 'react-hooks/exhaustive-deps' : 'error ' ,
141+ 'react-hooks/exhaustive-deps' : 'warn ' ,
140142 } ,
141143 } ,
142144
@@ -146,23 +148,20 @@ export default tseslint.config(
146148 rules : {
147149 // Components are stricter: 30 lines forces extraction into subcomponents.
148150 'max-lines-per-function' : [
149- 'error' ,
151+ 'warn' ,
152+ // biome-ignore lint/style/useNamingConvention: ESLint config property name
150153 { max : 30 , skipBlankLines : true , skipComments : true , IIFEs : true } ,
151154 ] ,
152155
153156 // Components must not take more than 2 props inline — use a Props type.
154157 // (This counts function params, not object keys inside the props type.)
155- 'max-params' : [ 'error ' , { max : 1 } ] ,
158+ 'max-params' : [ 'warn ' , { max : 1 } ] ,
156159 } ,
157160 } ,
158161
159162 // ── Test files — relax structural rules ───────────────────────────────────
160163 {
161- files : [
162- '**/*.spec.{ts,tsx}' ,
163- '**/*.test.{ts,tsx}' ,
164- '**/@tests/**/*.{ts,tsx}' ,
165- ] ,
164+ files : [ '**/*.spec.{ts,tsx}' , '**/*.test.{ts,tsx}' , '**/@tests/**/*.{ts,tsx}' ] ,
166165 rules : {
167166 'max-lines' : 'off' ,
168167 'max-lines-per-function' : 'off' ,
0 commit comments