File tree 1 file changed +12
-3
lines changed
packages/eslint-config/src/flat
1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -26,12 +26,15 @@ export function defineFlatConfigs(
26
26
27
27
/**
28
28
* Create an array of ESLint flat configs for Nuxt 3, based on the given options.
29
+ * Accpets appending user configs as rest arguments from the second argument.
29
30
*
30
- * Usually it would be use `@nuxt/eslint` module which will generate the necessary configuration based on your project.
31
- *
31
+ * For Nuxt apps, it's recommanded to use `@nuxt/eslint` module instead, which will generate the necessary configuration based on your project.
32
32
* @see https://eslint.nuxt.com/packages/module
33
33
*/
34
- export function createConfigForNuxt ( options : NuxtESLintConfigOptions = { } ) : FlatConfigComposer < FlatConfigItem > {
34
+ export function createConfigForNuxt (
35
+ options : NuxtESLintConfigOptions = { } ,
36
+ ...userConfigs : ResolvableFlatConfig [ ]
37
+ ) : FlatConfigComposer < FlatConfigItem > {
35
38
const c = composer ( )
36
39
37
40
const resolved = resolveOptions ( options )
@@ -73,5 +76,11 @@ export function createConfigForNuxt(options: NuxtESLintConfigOptions = {}): Flat
73
76
disables ( resolved ) ,
74
77
)
75
78
79
+ if ( userConfigs . length > 0 ) {
80
+ c . append ( ...userConfigs )
81
+ }
82
+
76
83
return c
77
84
}
85
+
86
+ export default createConfigForNuxt
You can’t perform that action at this time.
0 commit comments