From b2d1c7e8da4a5fba5361721d9a62c43a80851e41 Mon Sep 17 00:00:00 2001 From: peppineddu5 Date: Thu, 12 Dec 2024 15:11:28 +0100 Subject: [PATCH 1/3] chore: add and configure ts-plugin-sort-import-suggestions --- api/package.json | 5 +++-- api/tsconfig.json | 7 +++++++ frontend/package.json | 3 ++- frontend/tsconfig.json | 9 ++++++++- pnpm-lock.yaml | 11 +++++++++++ 5 files changed, 31 insertions(+), 4 deletions(-) diff --git a/api/package.json b/api/package.json index 5f37df9f7..caacf3aee 100644 --- a/api/package.json +++ b/api/package.json @@ -122,9 +122,8 @@ "@azure/service-bus": "^7.9.5", "@azure/storage-blob": "^12.26.0", "@effect-app/infra": "2.31.1", - "effect-app": "^2.19.3", - "@effect/platform": "^0.70.4", "@effect/opentelemetry": "^0.41.1", + "@effect/platform": "^0.70.4", "@effect/platform-node": "0.65.4", "@effect/rpc": "^0.45.4", "@effect/rpc-http": "^0.43.4", @@ -144,6 +143,7 @@ "date-fns": "^4.1.0", "dotenv": "^16.4.7", "effect": "^3.11.3", + "effect-app": "^2.19.3", "express": "^4.21.2", "express-compression": "^1.0.2", "express-oauth2-jwt-bearer": "^1.6.0", @@ -169,6 +169,7 @@ "@types/redis": "^2.8.32", "@types/swagger-ui-express": "^4.1.7", "eslint-plugin-formatjs": "^5.2.5", + "ts-plugin-sort-import-suggestions": "^1.0.4", "typescript": "~5.7.2" } } \ No newline at end of file diff --git a/api/tsconfig.json b/api/tsconfig.json index 534c4c0a4..c374e2fdf 100644 --- a/api/tsconfig.json +++ b/api/tsconfig.json @@ -20,6 +20,13 @@ "./src/*.js" ] }, + "plugins": [ + { + "name": "ts-plugin-sort-import-suggestions", + "moveUpPatterns": ["./*","../[../]","@/*","@/*","effect-app/*","@effect-app/*","effect","@effect/*"], + "moveDownPatterns":["node_modules/*"] + } + ] }, "extends": "../tsconfig.base.json", "references": [ diff --git a/frontend/package.json b/frontend/package.json index fe3c6fb05..042bf395a 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -18,11 +18,11 @@ }, "dependencies": { "@effect-app/vue": "^2.16.2", + "@effect/opentelemetry": "^0.41.1", "@effect/platform": "^0.70.4", "@effect/platform-browser": "^0.49.4", "@effect/rpc": "^0.45.4", "@effect/rpc-http": "^0.43.4", - "@effect/opentelemetry": "^0.41.1", "@formatjs/intl": "3.0.1", "@hebilicious/vue-query-nuxt": "^0.3.0", "@opentelemetry/context-zone": "^1.29.0", @@ -65,6 +65,7 @@ "h3": "^1.13.0", "nuxt": "~3.14.1592", "sass": "^1.82.0", + "ts-plugin-sort-import-suggestions": "^1.0.4", "typescript": "~5.7.2", "vue-tsc": "^2.1.10" } diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json index 6df0d55c6..f92beeb78 100644 --- a/frontend/tsconfig.json +++ b/frontend/tsconfig.json @@ -14,6 +14,13 @@ "noUncheckedIndexedAccess": true, // This is not desirable, as it's useful in generators. "noImplicitReturns": false, - "checkJs": false + "checkJs": false, + "plugins": [ + { + "name": "ts-plugin-sort-import-suggestions", + "moveUpPatterns": ["./*","../[../]","@/*","@/*","effect-app/*","@effect-app/*","effect","@effect/*"], + "moveDownPatterns":["node_modules/*"] + } + ] } } \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 21b2d79de..388dfbd05 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -379,6 +379,9 @@ importers: eslint-plugin-formatjs: specifier: ^5.2.5 version: 5.2.5(eslint@8.57.0)(typescript@5.7.2(patch_hash=i2s6pnnksgwmnqxtmioljcvjfq)) + ts-plugin-sort-import-suggestions: + specifier: ^1.0.4 + version: 1.0.4 typescript: specifier: ~5.7.2 version: 5.7.2(patch_hash=i2s6pnnksgwmnqxtmioljcvjfq) @@ -633,6 +636,9 @@ importers: sass: specifier: ^1.82.0 version: 1.82.0 + ts-plugin-sort-import-suggestions: + specifier: ^1.0.4 + version: 1.0.4 typescript: specifier: ~5.7.2 version: 5.7.2(patch_hash=i2s6pnnksgwmnqxtmioljcvjfq) @@ -8336,6 +8342,9 @@ packages: ts-pattern@5.5.0: resolution: {integrity: sha512-jqbIpTsa/KKTJYWgPNsFNbLVpwCgzXfFJ1ukNn4I8hMwyQzHMJnk/BqWzggB0xpkILuKzaO/aMYhS0SkaJyKXg==} + ts-plugin-sort-import-suggestions@1.0.4: + resolution: {integrity: sha512-85n5lm2OQQ+b7aRNK9omU1gmjMNXRsgeLwojm5u4OSY5sVBkAHTcgMQPEeHMNlyyfFW0uXnwgqAU0pNfhD96Bw==} + ts-toolbelt@9.6.0: resolution: {integrity: sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w==} @@ -18193,6 +18202,8 @@ snapshots: ts-pattern@5.5.0: {} + ts-plugin-sort-import-suggestions@1.0.4: {} + ts-toolbelt@9.6.0: {} tsc-watch@6.2.1(typescript@5.7.2(patch_hash=i2s6pnnksgwmnqxtmioljcvjfq)): From f9c5341569389de9cf6887d386147c7bfed7a97b Mon Sep 17 00:00:00 2001 From: peppineddu5 Date: Thu, 12 Dec 2024 15:33:56 +0100 Subject: [PATCH 2/3] fix: fix rule --- api/tsconfig.json | 2 +- frontend/tsconfig.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/tsconfig.json b/api/tsconfig.json index c374e2fdf..3dae41845 100644 --- a/api/tsconfig.json +++ b/api/tsconfig.json @@ -23,7 +23,7 @@ "plugins": [ { "name": "ts-plugin-sort-import-suggestions", - "moveUpPatterns": ["./*","../[../]","@/*","@/*","effect-app/*","@effect-app/*","effect","@effect/*"], + "moveUpPatterns": ["./*","../*","#/*","@/*","effect-app/*","@effect-app/*","effect","@effect/*"], "moveDownPatterns":["node_modules/*"] } ] diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json index f92beeb78..226877367 100644 --- a/frontend/tsconfig.json +++ b/frontend/tsconfig.json @@ -18,7 +18,7 @@ "plugins": [ { "name": "ts-plugin-sort-import-suggestions", - "moveUpPatterns": ["./*","../[../]","@/*","@/*","effect-app/*","@effect-app/*","effect","@effect/*"], + "moveUpPatterns": ["./*","../*","#/*","@/*","effect-app/*","@effect-app/*","effect","@effect/*"], "moveDownPatterns":["node_modules/*"] } ] From 11d1fc74da00796fb8da76a9eb165bdb4c59aeef Mon Sep 17 00:00:00 2001 From: peppineddu5 Date: Thu, 9 Jan 2025 11:00:36 +0100 Subject: [PATCH 3/3] fix # pattern --- api/tsconfig.json | 2 +- frontend/tsconfig.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/tsconfig.json b/api/tsconfig.json index 3dae41845..5713ddca7 100644 --- a/api/tsconfig.json +++ b/api/tsconfig.json @@ -23,7 +23,7 @@ "plugins": [ { "name": "ts-plugin-sort-import-suggestions", - "moveUpPatterns": ["./*","../*","#/*","@/*","effect-app/*","@effect-app/*","effect","@effect/*"], + "moveUpPatterns": ["./*","../*","#*/","@/*","effect-app/*","@effect-app/*","effect","@effect/*"], "moveDownPatterns":["node_modules/*"] } ] diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json index 226877367..59cc41103 100644 --- a/frontend/tsconfig.json +++ b/frontend/tsconfig.json @@ -18,7 +18,7 @@ "plugins": [ { "name": "ts-plugin-sort-import-suggestions", - "moveUpPatterns": ["./*","../*","#/*","@/*","effect-app/*","@effect-app/*","effect","@effect/*"], + "moveUpPatterns": ["./*","../*","#*/","@/*","effect-app/*","@effect-app/*","effect","@effect/*"], "moveDownPatterns":["node_modules/*"] } ]