Skip to content

Commit 2bd835b

Browse files
committed
fix(module): config creation, fix #346
1 parent 114916f commit 2bd835b

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

packages/module/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"@nuxt/eslint-plugin": "workspace:*",
4949
"@nuxt/kit": "^3.11.1",
5050
"chokidar": "^3.6.0",
51-
"eslint-flat-config-viewer": "^0.1.12",
51+
"eslint-flat-config-viewer": "^0.1.13",
5252
"get-port-please": "^3.1.2",
5353
"pathe": "^1.1.2",
5454
"unimport": "^3.7.1"

packages/module/src/modules/config.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,16 @@ import { ConfigGenOptions, ModuleOptions } from '../module'
1010
import { createAddonGlobals } from '../config-addons/globals'
1111

1212
export async function setupConfigGen(options: ModuleOptions, nuxt: Nuxt) {
13+
const defaultAddons = [
14+
createAddonGlobals(nuxt),
15+
]
16+
1317
addTemplate({
1418
filename: 'eslint.config.mjs',
1519
write: true,
1620
async getContents() {
1721
const addons: ESLintConfigGenAddon[] = [
18-
createAddonGlobals(nuxt),
22+
...defaultAddons,
1923
]
2024
await nuxt.callHook('eslint:config:addons', addons)
2125
return generateESLintConfig(options, nuxt, addons)

pnpm-lock.yaml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)