Skip to content

Commit 766ae93

Browse files
authored
fix: sort imports objects by from + name (#578)
1 parent 8180f01 commit 766ae93

File tree

1 file changed

+1
-1
lines changed
  • packages/module/src/modules/config/addons

1 file changed

+1
-1
lines changed

packages/module/src/modules/config/addons/globals.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export function createAddonGlobals(nuxt: Nuxt): ESLintConfigGenAddon {
2020
const imports = [
2121
...await unimport?.getImports() || [],
2222
...await nitroUnimport?.getImports() || [],
23-
].sort()
23+
].sort((a, b) => 10 * a.from.localeCompare(b.from) + a.name.localeCompare(b.name))
2424

2525
return {
2626
configs: [

0 commit comments

Comments
 (0)