From e2dafee8dcf081696f9c08f6358d5e3d8ee38c32 Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Mon, 30 Jun 2025 02:46:26 -0700 Subject: [PATCH] [Dev] Enable Biome import sorting Additional changes: - Implement import aliases - Convert default exports to named exports - Remove relative imports --- biome.jsonc | 5 ++--- tsconfig.json | 33 +++++++++++++++++++++++++++++++-- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/biome.jsonc b/biome.jsonc index ff541f4dcc2..ed5db201824 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -38,14 +38,13 @@ ] }, - // TODO: Configure and enable import sorting "assist": { "actions": { "source": { "organizeImports": { - "level": "off", + "level": "on", "options": { - "groups": [] + "groups": [":ALIAS:", ":NODE:", ":PACKAGE_WITH_PROTOCOL:", ":PACKAGE:", ":PATH:"] } } } diff --git a/tsconfig.json b/tsconfig.json index 6af3e9ce650..f41b3e5895a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,9 +11,38 @@ "rootDir": ".", "baseUrl": "./src", "paths": { + "#abilities/*": ["./data/abilities/*.ts"], + "#api/*": ["./plugins/api/*.ts"], + "#balance/*": ["./data/balance/*.ts"], "#enums/*": ["./enums/*.ts"], - "#app/*": ["*.ts"], - "#test/*": ["../test/*.ts"] + "#events/*": ["./events/*.ts"], + "#field/*": ["./field/*.ts"], + "#inputs/*": ["./configs/inputs/*.ts"], + "#modifiers/*": ["./modifier/*.ts"], + "#moves/*": ["./data/moves/*.ts"], + "#mystery-encounters/*": [ + "./data/mystery-encounters/utils/*.ts", + "./data/mystery-encounters/encounters/*.ts", + "./data/mystery-encounters/requirements/*.ts", + "./data/mystery-encounters/*.ts" + ], + "#package.json": ["../package.json"], + "#phases/*": ["./phases/*.ts"], + "#plugins/*": ["./plugins/vite/*.ts", "./plugins/*.ts"], + "#sprites/*": ["./sprites/*.ts"], + "#system/*": [ + "./system/settings/*.ts", + "./system/version_migration/versions/*.ts", + "./system/version_migration/*.ts", + "./system/*.ts" + ], + "#trainers/*": ["./data/trainers/*.ts"], + "#types/*": ["./@types/*.ts", "./typings/phaser/*.ts"], + "#ui/*": ["./ui/battle-info/*.ts", "./ui/settings/*.ts", "./ui/*.ts"], + "#utils/*": ["./utils/*.ts"], + "#data/*": ["./data/pokemon-forms/*.ts", "./data/pokemon/*.ts", "./data/*.ts"], + "#test/*": ["../test/*.ts"], + "#app/*": ["*.ts"] }, "outDir": "./build", "noEmit": true