File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,16 +72,18 @@ export const flatConfigTypescript = (rulesOnly = false) =>
7272 baseConfig ,
7373 ] ) ;
7474
75- export const flatConfigReact = defineConfig ( [
76- ...flatConfigTypescript ( ) ,
77- reactPlugin . configs . flat . recommended ,
78- reactPlugin . configs . flat [ 'jsx-runtime' ] ,
79- reactHooks . configs . flat . recommended ,
80- reactConfig ,
81- ] ) ;
75+ export const flatConfigReact = ( ) =>
76+ defineConfig ( [
77+ ...flatConfigTypescript ( ) ,
78+ reactPlugin . configs . flat . recommended ,
79+ reactPlugin . configs . flat [ 'jsx-runtime' ] ,
80+ reactHooks . configs . flat . recommended ,
81+ reactConfig ,
82+ ] ) ;
8283
83- export const flatConfigNext = defineConfig ( [
84- ...createRequire ( import . meta. url ) ( 'eslint-config-next/core-web-vitals' ) ,
85- ...flatConfigTypescript ( true ) ,
86- reactConfig ,
87- ] ) ;
84+ export const flatConfigNext = ( ) =>
85+ defineConfig ( [
86+ ...createRequire ( import . meta. url ) ( 'eslint-config-next/core-web-vitals' ) ,
87+ ...flatConfigTypescript ( true ) ,
88+ reactConfig ,
89+ ] ) ;
Original file line number Diff line number Diff line change @@ -6,9 +6,9 @@ export const config = (type: 'typescript' | 'react' | 'nextjs'): Linter.Config[]
66 case 'typescript' :
77 return flatConfigTypescript ( ) ;
88 case 'react' :
9- return flatConfigReact ;
9+ return flatConfigReact ( ) ;
1010 case 'nextjs' :
11- return flatConfigNext ;
11+ return flatConfigNext ( ) ;
1212 default :
1313 throw new Error ( `Unknown config type: ${ type } ` ) ;
1414 }
You can’t perform that action at this time.
0 commit comments