Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix: Fix the sorting of imports (#42419)

Ivan Vasilov3a391d4f6b27
diff --git a/package.json b/package.json
index 2e7f7100660..aec57044d4b 100644
--- a/package.json
+++ b/package.json
@@ -44,7 +44,7 @@
},
"devDependencies": {
"@aws-sdk/client-secrets-manager": "^3.823.0",
- "@trivago/prettier-plugin-sort-imports": "^6.0.0",
+ "@ianvs/prettier-plugin-sort-imports": "^4.7.0",
"@types/node": "catalog:",
"eslint": "^9.0.0",
"prettier": "3.2.4",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index f3dd09b2b94..bc4d369eadc 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -95,9 +95,9 @@ importers:
'@aws-sdk/client-secrets-manager':
specifier: ^3.823.0
version: 3.823.0
- '@trivago/prettier-plugin-sort-imports':
- specifier: ^6.0.0
+ '@ianvs/prettier-plugin-sort-imports':
+ specifier: ^4.7.0
'@types/node':
specifier: 'catalog:'
version: 22.13.14
@@ -4222,6 +4222,24 @@ packages:
resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==}
engines: {node: '>=18.18'}
+ '@ianvs/[email protected]':
+ resolution: {integrity: sha512-soa2bPUJAFruLL4z/CnMfSEKGznm5ebz29fIa9PxYtu8HHyLKNE1NXAs6dylfw1jn/ilEIfO2oLLN6uAafb7DA==}
+ peerDependencies:
+ '@prettier/plugin-oxc': ^0.0.4
+ '@vue/compiler-sfc': 2.7.x || 3.x
+ content-tag: ^4.0.0
+ prettier: 2 || 3 || ^4.0.0-0
+ prettier-plugin-ember-template-tag: ^2.1.0
+ peerDependenciesMeta:
+ '@prettier/plugin-oxc':
+ optional: true
+ '@vue/compiler-sfc':
+ optional: true
+ content-tag:
+ optional: true
+ prettier-plugin-ember-template-tag:
+ optional: true
+
'@iconify/[email protected]':
resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==}
@@ -9174,25 +9192,6 @@ packages:
resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==}
engines: {node: '>= 10'}
- '@trivago/[email protected]':
- resolution: {integrity: sha512-Xarx55ow0R8oC7ViL5fPmDsg1EBa1dVhyZFVbFXNtPPJyW2w9bJADIla8YFSaNG9N06XfcklA9O9vmw4noNxkQ==}
- engines: {node: '>= 20'}
- peerDependencies:
- '@vue/compiler-sfc': 3.x
- prettier: 2.x - 3.x
- prettier-plugin-ember-template-tag: '>= 2.0.0'
- prettier-plugin-svelte: 3.x
- svelte: 4.x || 5.x
- peerDependenciesMeta:
- '@vue/compiler-sfc':
- optional: true
- prettier-plugin-ember-template-tag:
- optional: true
- prettier-plugin-svelte:
- optional: true
- svelte:
- optional: true
-
'@ts-morph/[email protected]':
resolution: {integrity: sha512-m7Lllj9n/S6sOkCkRftpM7L24uvmfXQFedlW/4hENcuJH1HHm9u5EgxZb9uVjQSCGrbBWBkOGgcTxNg36r6ywA==}
@@ -13995,9 +13994,6 @@ packages:
engines: {node: '>=10'}
hasBin: true
- resolution: {integrity: sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==}
-
resolution: {integrity: sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==}
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
@@ -15941,9 +15937,6 @@ packages:
resolution: {integrity: sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q==}
engines: {node: '>=0.8'}
- resolution: {integrity: sha512-4s6vd6dx1AotCx/RCI2m7t7GCh5bDRUtGNvRfHSP2wbBQdMi67pPe7mtzmgwcaQ8VKK/6IB7Glfyu3qdZJPybQ==}
-
resolution: {integrity: sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==}
engines: {node: '>=4'}
@@ -15970,9 +15963,6 @@ packages:
resolution: {integrity: sha512-EuCycjZtfPcjWk7KTksnJ5xPMvWGA/6i4zrLYhRG0hGvC3GPU/jGUj3Cy+ZR0v30duV3e23R95T1lE2+lsndSw==}
- resolution: {integrity: sha512-HlsyYdMBnbPQ9Jr/VgJ1YF4scnldvJpJxCVx6KgqPL4dxppsWrJHCIIxQXMJrqGnsRkNPATbeMJ8Yxu7JMsYcA==}
-
resolution: {integrity: sha512-bCgsFI+GeGWPAvAiUv63ZorMeif3/U0zaXABGJbOWt5OH2KCaPHF6S+0ok4aqM9RuIPGyZdx9tR9l13PsW4AYQ==}
engines: {node: '>=14.13.0'}
@@ -22462,6 +22452,19 @@ snapshots:
'@humanwhocodes/[email protected]': {}
+ dependencies:
+ '@babel/generator': 7.28.3
+ '@babel/parser': 7.28.4
+ '@babel/traverse': 7.28.4([email protected])
+ '@babel/types': 7.28.4
+ prettier: 3.2.4
+ semver: 7.7.3
+ optionalDependencies:
+ '@vue/compiler-sfc': 3.5.21
+ transitivePeerDependencies:
+ - supports-color
+
'@iconify/[email protected]': {}
@@ -28593,22 +28596,6 @@ snapshots:
'@tootallnate/[email protected]':
optional: true
- dependencies:
- '@babel/generator': 7.28.3
- '@babel/parser': 7.28.4
- '@babel/traverse': 7.28.4([email protected])
- '@babel/types': 7.28.4
- javascript-natural-sort: 0.7.1
- lodash-es: 4.17.23
- minimatch: 9.0.5
- parse-imports-exports: 0.2.4
- prettier: 3.2.4
- optionalDependencies:
- '@vue/compiler-sfc': 3.5.21
- transitivePeerDependencies:
- - supports-color
-
'@ts-morph/[email protected]':
dependencies:
fast-glob: 3.3.3
@@ -34164,8 +34151,6 @@ snapshots:
filelist: 1.0.4
minimatch: 3.1.2
-
dependencies:
chalk: 4.1.2
@@ -37074,10 +37059,6 @@ snapshots:
map-cache: 0.2.2
path-root: 0.1.1
- dependencies:
- parse-statements: 1.0.11
-
dependencies:
error-ex: 1.3.2
@@ -37106,8 +37087,6 @@ snapshots:
dependencies:
protocols: 2.0.2
-
dependencies:
'@types/parse-path': 7.1.0
diff --git a/prettier.config.mjs b/prettier.config.mjs
index 1e6299b3470..26d1ac4e645 100644
--- a/prettier.config.mjs
+++ b/prettier.config.mjs
@@ -15,16 +15,13 @@ let options = {
],
}
-// Disable sorting imports when running a prettier command in CI. This is to make the sorting work in editors
-// for easier migration.
+// Disable sorting imports when running a prettier command in CI. This is to make the sorting work in editors
+// for easier migration.
if (process.env.SORT_IMPORTS !== 'false') {
options = {
...options,
- plugins: [...options.plugins, '@trivago/prettier-plugin-sort-imports'],
- importOrder: ['<THIRD_PARTY_MODULES>', '^(@|\.{1,2})\/(.*)$'],
- importOrderSeparation: true,
- importOrderSortSpecifiers: true,
- importOrderSideEffects: false,
+ plugins: [...options.plugins, '@ianvs/prettier-plugin-sort-imports'],
+ importOrder: ['<THIRD_PARTY_MODULES>', '', '^(@|\\.{1,2})/(.*)$'],
}
}