Skip to content

Commit

Permalink
fix(module): config duplications on module reload
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Apr 10, 2024
1 parent d72c09f commit a6092f8
Show file tree
Hide file tree
Showing 7 changed files with 190 additions and 190 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
"@nuxt/eslint-plugin": "workspace:*",
"@nuxt/test-utils": "^3.12.0",
"@types/eslint": "^8.56.7",
"@types/node": "^20.12.6",
"@types/node": "^20.12.7",
"bumpp": "^9.4.0",
"eslint": "^9.0.0",
"typescript": "^5.4.4",
"typescript": "^5.4.5",
"vitest": "^1.4.0",
"vue": "^3.4.21"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
"eslint": "^8.57.0"
},
"devDependencies": {
"typescript": "^5.4.4"
"typescript": "^5.4.5"
}
}
2 changes: 1 addition & 1 deletion packages-legacy/nuxt2-eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"dependencies": {
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^17.1.0",
"eslint-plugin-n": "^17.2.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-unicorn": "^52.0.0",
"eslint-plugin-vue": "^9.24.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"@typescript-eslint/eslint-plugin": "^7.6.0",
"@typescript-eslint/parser": "^7.6.0",
"eslint-config-flat-gitignore": "^0.1.5",
"eslint-flat-config-utils": "^0.2.1",
"eslint-flat-config-utils": "^0.2.2",
"eslint-plugin-import-x": "^0.5.0",
"eslint-plugin-jsdoc": "^48.2.3",
"eslint-plugin-unicorn": "^52.0.0",
Expand All @@ -71,6 +71,6 @@
"devDependencies": {
"@types/eslint": "^8.56.7",
"eslint": "^9.0.0",
"typescript": "^5.4.4"
"typescript": "^5.4.5"
}
}
6 changes: 3 additions & 3 deletions packages/module/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@
}
},
"dependencies": {
"@eslint/config-inspector": "^0.4.4",
"@eslint/config-inspector": "^0.4.5",
"@nuxt/devtools-kit": "^1.1.5",
"@nuxt/eslint-config": "workspace:*",
"@nuxt/eslint-plugin": "workspace:*",
"@nuxt/kit": "^3.11.2",
"chokidar": "^3.6.0",
"eslint-flat-config-utils": "^0.2.1",
"eslint-typegen": "^0.2.1",
"eslint-flat-config-utils": "^0.2.2",
"eslint-typegen": "^0.2.2",
"find-up": "^7.0.0",
"get-port-please": "^3.1.2",
"mlly": "^1.6.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/module/src/modules/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ async function generateESLintConfig(options: ModuleOptions, nuxt: Nuxt, addons:
`)`,
'',
'export function withNuxt(...customs) {',
' return configs.append(...customs).onResolved(configs => typegen(configs, { dtsPath: new URL("./eslint-typegen.d.ts", import.meta.url) }))',
' return configs.clone().append(...customs).onResolved(configs => typegen(configs, { dtsPath: new URL("./eslint-typegen.d.ts", import.meta.url) }))',
'}',
'',
'export default withNuxt',
Expand Down

0 comments on commit a6092f8

Please sign in to comment.