From 31efc1939bd73f743cca711c35bf591972465dc6 Mon Sep 17 00:00:00 2001 From: Bertie690 Date: Fri, 1 Aug 2025 11:00:53 -0400 Subject: [PATCH 1/9] [Dev] Added `devcontainer.json` and VS code config files --- .devcontainer/devcontainer.json | 23 +++++++++++ .gitignore | 1 - .ls-lint.yml | 1 + .vscode/extensions.json | 12 ++++++ .vscode/launch.json | 31 +++++++++++++++ .vscode/settings.json | 16 ++++++++ .vscode/tasks.json | 70 +++++++++++++++++++++++++++++++++ 7 files changed, 153 insertions(+), 1 deletion(-) create mode 100644 .devcontainer/devcontainer.json create mode 100644 .vscode/extensions.json create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json create mode 100644 .vscode/tasks.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000000..544bcc891ba --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,23 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node +{ + "name": "Node.js & TypeScript", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm", + "features": { + "ghcr.io/devcontainers/features/github-cli:1": { + "installDirectlyFromGitHubRelease": true, + "version": "latest" + }, + "ghcr.io/devcontainers-extra/features/pnpm:2": { + "version": "latest" + } + }, + "customizations": { + "vscode": { + "extensions": ["aaron-bond.better-comments", ""] + } + }, + "postCreateCommand": "pnpm install && pnpm postinstall", + "forwardPorts": [8000] +} diff --git a/.gitignore b/.gitignore index 00df0002e01..6ae2ca47371 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,6 @@ dist-ssr *.local # Editor directories and files -.vscode *.code-workspace .idea .DS_Store diff --git a/.ls-lint.yml b/.ls-lint.yml index 22f08f72938..0086367367b 100644 --- a/.ls-lint.yml +++ b/.ls-lint.yml @@ -26,3 +26,4 @@ ignore: - .git - public - dist + - .devcontainer diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000000..5ea3ed00fcf --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,12 @@ +{ + "recommendations": [ + "biomejs.biome", + "dbaeumer.vscode-eslint", + "YoavBls.pretty-ts-errors", + "vitest.explorer", + + // This stuff isn't mandatory - it's just nice to have ;) + "adpyke.codesnap", + "aaron-bond.better-comments" + ] +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000000..e53e4256bb9 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,31 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Debug Vitest", + "skipFiles": ["/**"], + "program": "${workspaceFolder}/node_modules/vitest/vitest.mjs", + "args": ["--inspectBrk", "--no-file-parallelism", "${input:testfile}", "-t", "${input:testcase}"], + "autoAttachChildProcesses": true + } + ], + "inputs": [ + { + "id": "testfile", + "type": "promptString", + "description": "Enter test file to run.", + "default": "${fileBasename}" + }, + { + "id": "testcase", + "type": "promptString", + "description": "Enter test case to run.", + "default": "" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000000..118b81dd263 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,16 @@ +{ + "editor.defaultFormatter": "biomejs.biome", + "editor.tabSize": 2, + "editor.insertSpaces": true, + "typescript.preferences.importModuleSpecifier": "non-relative", + "javascript.preferences.importModuleSpecifier": "non-relative", + "javascript.preferences.importModuleSpecifierEnding": "index", + "typescript.preferences.importModuleSpecifierEnding": "index", + "editor.codeActionsOnSave": { + "source.addMissingImports.ts": "always", + "source.removeUnusedImports": "always", + "source.fixAll.eslint": "always", + "source.fixAll.biome": "always", + "source.organizeImports.biome": "always" +}, +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000000..ef3d03bb034 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,70 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "presentation": { + "reveal": "never", + "focus": false + }, + "tasks": [ + { + "label": "Update Submodules", + "type": "shell", + "command": "git submodule update --init --recursive", + "icon": { + "color": "terminal.ansiRed", + "id": "git-branch" + }, + }, + { + "label": "Clear Submodules", + "type": "shell", + "command": "rm -rf public/locales; git checkout upstream/beta -- public/locales", + "icon": { + "color": "terminal.ansiRed", + "id": "trash" + }, + }, + { + "label": "Biome - Write All", + "type": "shell", + "command": { + "value": "pnpm", + "quoting": "weak" + }, + "args": [ + "run", + "biome", + "--diagnostic-level=${input:error-level}" + ], + "icon": { + "color": "terminal.ansiBlue", + "id": "json" + }, + "problemMatcher": [] + }, + { + "label": "Start Local Dev", + "type": "npm", + "script": "start:dev", + "icon": { + "color": "terminal.ansiGreen", + "id": "debug-start" + }, + "problemMatcher": [] + } + ], + "inputs": [ + { + "id": "error-level", + "description": "Select the level of errors to report from Biome.", + "type": "pickString", + "options": [ + "error", + "warning", + "info" + ], + "default": "error" + } + ] +} \ No newline at end of file From cfef6799674e195bd37da3abc4e05dc2831e2bf0 Mon Sep 17 00:00:00 2001 From: Bertie690 <136088738+Bertie690@users.noreply.github.com> Date: Fri, 1 Aug 2025 11:55:01 -0400 Subject: [PATCH 2/9] Update settings.json --- .vscode/settings.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 118b81dd263..c896d0bb2db 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -12,5 +12,6 @@ "source.fixAll.eslint": "always", "source.fixAll.biome": "always", "source.organizeImports.biome": "always" -}, -} \ No newline at end of file + }, + "vitest.cliArguments": "--no-isolate", +} From 11ca0122701e56c43e22717d9ba65983f970eba6 Mon Sep 17 00:00:00 2001 From: Bertie690 <136088738+Bertie690@users.noreply.github.com> Date: Fri, 1 Aug 2025 11:56:46 -0400 Subject: [PATCH 3/9] Removed "don't lint vscode json files" setting from `biome.jsonc` --- biome.jsonc | 2 -- 1 file changed, 2 deletions(-) diff --git a/biome.jsonc b/biome.jsonc index 470885a543d..83018d712a4 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -26,7 +26,6 @@ "!**/public/**/*", "!**/.github/**/*", "!**/node_modules/**/*", - "!**/.vscode/**/*", "!**/typedoc/**/*", // TODO: lint css and html? "!**/*.css", @@ -37,7 +36,6 @@ "!**/src/data/balance/tms.ts" ] }, - "assist": { "actions": { "source": { From b1468c17ef5c7b0d91d79a3c67cd264052999584 Mon Sep 17 00:00:00 2001 From: Bertie690 <136088738+Bertie690@users.noreply.github.com> Date: Fri, 1 Aug 2025 13:28:09 -0400 Subject: [PATCH 4/9] Update settings.json --- .vscode/settings.json | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index c896d0bb2db..31b6b7730be 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,11 +1,8 @@ { + // # Formatter configs "editor.defaultFormatter": "biomejs.biome", "editor.tabSize": 2, "editor.insertSpaces": true, - "typescript.preferences.importModuleSpecifier": "non-relative", - "javascript.preferences.importModuleSpecifier": "non-relative", - "javascript.preferences.importModuleSpecifierEnding": "index", - "typescript.preferences.importModuleSpecifierEnding": "index", "editor.codeActionsOnSave": { "source.addMissingImports.ts": "always", "source.removeUnusedImports": "always", @@ -13,5 +10,28 @@ "source.fixAll.biome": "always", "source.organizeImports.biome": "always" }, + "biome.suggestInstallingGlobally": false, + + // # JS/TS setting overrides + "javascript.updateImportsOnFileMove.enabled": "always", + "javascript.preferences.importModuleSpecifier": "non-relative", + "javascript.preferences.importModuleSpecifierEnding": "index", + "javascript.preferGoToSourceDefinition": true, + "javascript.updateImportsOnFileMove.enabled": "always", + + "typescript.updateImportsOnFileMove.enabled": "always", + "typescript.preferences.importModuleSpecifier": "non-relative", + "typescript.preferences.importModuleSpecifierEnding": "index", + "typescript.preferGoToSourceDefinition": true, + "typescript.updateImportsOnFileMove.enabled": "always", + + "typescript.tsserver.experimental.enableProjectDiagnostics": true, + // Note: You may want to adjust the max server memory if your PC supports it + "typescript.tsserver.maxTsServerMemory": 1536, // 1.5 GB by default + "typescript.autoClosingTags": false, + + // # Miscellaneous + "npm.packageManager": "pnpm", + "npm.scriptRunner": "pnpm", "vitest.cliArguments": "--no-isolate", } From e59dc87bf1996efba66dfe4aa3be80d5a4a8bb14 Mon Sep 17 00:00:00 2001 From: Bertie690 <136088738+Bertie690@users.noreply.github.com> Date: Fri, 1 Aug 2025 18:02:45 -0400 Subject: [PATCH 5/9] Update extensions.json Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> --- .vscode/extensions.json | 1 - 1 file changed, 1 deletion(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 5ea3ed00fcf..4ce39f3c27c 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,7 +1,6 @@ { "recommendations": [ "biomejs.biome", - "dbaeumer.vscode-eslint", "YoavBls.pretty-ts-errors", "vitest.explorer", From c9ea813b01d102e7cd8c2e55ece04a160023f8fb Mon Sep 17 00:00:00 2001 From: Bertie690 <136088738+Bertie690@users.noreply.github.com> Date: Fri, 1 Aug 2025 18:05:43 -0400 Subject: [PATCH 6/9] Update settings.json Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> --- .vscode/settings.json | 1 - 1 file changed, 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 31b6b7730be..1ebfe796454 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -13,7 +13,6 @@ "biome.suggestInstallingGlobally": false, // # JS/TS setting overrides - "javascript.updateImportsOnFileMove.enabled": "always", "javascript.preferences.importModuleSpecifier": "non-relative", "javascript.preferences.importModuleSpecifierEnding": "index", "javascript.preferGoToSourceDefinition": true, From c88af5d058dc36892b15ef41d6859ea84b2c4db6 Mon Sep 17 00:00:00 2001 From: Bertie690 <136088738+Bertie690@users.noreply.github.com> Date: Fri, 1 Aug 2025 18:05:53 -0400 Subject: [PATCH 7/9] Update settings.json Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> --- .vscode/settings.json | 1 - 1 file changed, 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 1ebfe796454..2a941bb5ded 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -18,7 +18,6 @@ "javascript.preferGoToSourceDefinition": true, "javascript.updateImportsOnFileMove.enabled": "always", - "typescript.updateImportsOnFileMove.enabled": "always", "typescript.preferences.importModuleSpecifier": "non-relative", "typescript.preferences.importModuleSpecifierEnding": "index", "typescript.preferGoToSourceDefinition": true, From 53c88192f51675d2ef636a64430ca41a93d438a8 Mon Sep 17 00:00:00 2001 From: Bertie690 <136088738+Bertie690@users.noreply.github.com> Date: Fri, 1 Aug 2025 18:07:59 -0400 Subject: [PATCH 8/9] Update settings.json --- .vscode/settings.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 2a941bb5ded..733bbb932f7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,7 +6,6 @@ "editor.codeActionsOnSave": { "source.addMissingImports.ts": "always", "source.removeUnusedImports": "always", - "source.fixAll.eslint": "always", "source.fixAll.biome": "always", "source.organizeImports.biome": "always" }, @@ -24,8 +23,8 @@ "typescript.updateImportsOnFileMove.enabled": "always", "typescript.tsserver.experimental.enableProjectDiagnostics": true, - // Note: You may want to adjust the max server memory if your PC supports it - "typescript.tsserver.maxTsServerMemory": 1536, // 1.5 GB by default + // Note: You may want to adjust the max server memory depending on your PC's specs: + // "typescript.tsserver.maxTsServerMemory": 1536, // 1.5 GB by default "typescript.autoClosingTags": false, // # Miscellaneous From 0e4d924433edcd3d26ab3ad9b3a709f23eb896a2 Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Sat, 2 Aug 2025 01:40:32 -0700 Subject: [PATCH 9/9] Re-add `.vscode/` to Biome ignore list --- biome.jsonc | 1 + 1 file changed, 1 insertion(+) diff --git a/biome.jsonc b/biome.jsonc index 83018d712a4..59bb98416ba 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -26,6 +26,7 @@ "!**/public/**/*", "!**/.github/**/*", "!**/node_modules/**/*", + "!**/.vscode/**/*", "!**/typedoc/**/*", // TODO: lint css and html? "!**/*.css",