From 31efc1939bd73f743cca711c35bf591972465dc6 Mon Sep 17 00:00:00 2001 From: Bertie690 Date: Fri, 1 Aug 2025 11:00:53 -0400 Subject: [PATCH 01/13] [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 02/13] 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 03/13] 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 04/13] 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 05/13] 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 06/13] 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 07/13] 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 08/13] 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 09/13] 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", From 890cd6bcc56d1adf19d62c574330c4cc940618e4 Mon Sep 17 00:00:00 2001 From: Bertie690 <136088738+Bertie690@users.noreply.github.com> Date: Thu, 7 Aug 2025 10:35:31 -0400 Subject: [PATCH 10/13] 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 733bbb932f7..f68c34882d5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -25,7 +25,6 @@ "typescript.tsserver.experimental.enableProjectDiagnostics": true, // 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 "npm.packageManager": "pnpm", From 77f9a80cf853fa7030f6797a6a5b2fc45ee8472f Mon Sep 17 00:00:00 2001 From: Bertie690 <136088738+Bertie690@users.noreply.github.com> Date: Thu, 7 Aug 2025 11:00:20 -0400 Subject: [PATCH 11/13] Update .devcontainer/devcontainer.json Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 544bcc891ba..ea72ced5571 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -18,6 +18,6 @@ "extensions": ["aaron-bond.better-comments", ""] } }, - "postCreateCommand": "pnpm install && pnpm postinstall", + "postCreateCommand": "pnpm install", "forwardPorts": [8000] } From b1434c145786cee1f94d1dd7388cf3dae8e9fd0b Mon Sep 17 00:00:00 2001 From: Bertie690 Date: Thu, 7 Aug 2025 11:21:38 -0400 Subject: [PATCH 12/13] Removed non-`extensions.json` files; added default config directly to devcontainer --- .devcontainer/devcontainer.json | 40 ++++++++++++++++++- .gitignore | 4 +- .vscode/extensions.json | 8 ++-- .vscode/launch.json | 31 --------------- .vscode/settings.json | 33 ---------------- .vscode/tasks.json | 70 --------------------------------- 6 files changed, 47 insertions(+), 139 deletions(-) delete mode 100644 .vscode/launch.json delete mode 100644 .vscode/settings.json delete mode 100644 .vscode/tasks.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index ea72ced5571..e94afd0a9be 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -15,7 +15,45 @@ }, "customizations": { "vscode": { - "extensions": ["aaron-bond.better-comments", ""] + "settings": { + // # Formatter configs + "editor.defaultFormatter": "biomejs.biome", + "editor.tabSize": 2, + "editor.insertSpaces": true, + "editor.codeActionsOnSave": { + "source.addMissingImports.ts": "always", + "source.removeUnusedImports": "always", + "source.fixAll.biome": "always", + "source.organizeImports.biome": "always" + }, + "biome.suggestInstallingGlobally": false, + + // # JS/TS setting overrides + "javascript.preferences.importModuleSpecifier": "non-relative", + "javascript.preferences.importModuleSpecifierEnding": "index", + "javascript.preferGoToSourceDefinition": true, + "javascript.updateImportsOnFileMove.enabled": "always", + + "typescript.preferences.importModuleSpecifier": "non-relative", + "typescript.preferences.importModuleSpecifierEnding": "index", + "typescript.preferGoToSourceDefinition": true, + "typescript.updateImportsOnFileMove.enabled": "always", + + "typescript.tsserver.experimental.enableProjectDiagnostics": true, + + // # Miscellaneous + "npm.packageManager": "pnpm", + "npm.scriptRunner": "pnpm", + "vitest.cliArguments": "--no-isolate" + }, + "extensions": [ + "biomejs.biome", + "YoavBls.pretty-ts-errors", + "vitest.explorer", + "adpyke.codesnap", // Bind to a hotkey (ctrl+\, etc) for best results + "aaron-bond.better-comments", + "MuTsunTsai.jsdoc-link" + ] } }, "postCreateCommand": "pnpm install", diff --git a/.gitignore b/.gitignore index 6ae2ca47371..299767e742a 100644 --- a/.gitignore +++ b/.gitignore @@ -12,8 +12,10 @@ dist dist-ssr *.local -# Editor directories and files +# Editor directories and files (excluding `extensions.json` for devcontainer) *.code-workspace +.vscode/* +!.vscode/extensions.json .idea .DS_Store *.suo diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 4ce39f3c27c..81abc8df2c0 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -4,8 +4,10 @@ "YoavBls.pretty-ts-errors", "vitest.explorer", - // This stuff isn't mandatory - it's just nice to have ;) - "adpyke.codesnap", - "aaron-bond.better-comments" + // This stuff isn't mandatory - it's just nice to have :) + + "adpyke.codesnap", // Bind to a hotkey (ctrl+\, etc) for best results + "aaron-bond.better-comments", + "MuTsunTsai.jsdoc-link" ] } \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index e53e4256bb9..00000000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - // 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 deleted file mode 100644 index f68c34882d5..00000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - // # Formatter configs - "editor.defaultFormatter": "biomejs.biome", - "editor.tabSize": 2, - "editor.insertSpaces": true, - "editor.codeActionsOnSave": { - "source.addMissingImports.ts": "always", - "source.removeUnusedImports": "always", - "source.fixAll.biome": "always", - "source.organizeImports.biome": "always" - }, - "biome.suggestInstallingGlobally": false, - - // # JS/TS setting overrides - "javascript.preferences.importModuleSpecifier": "non-relative", - "javascript.preferences.importModuleSpecifierEnding": "index", - "javascript.preferGoToSourceDefinition": true, - "javascript.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 depending on your PC's specs: - // "typescript.tsserver.maxTsServerMemory": 1536, // 1.5 GB by default - - // # Miscellaneous - "npm.packageManager": "pnpm", - "npm.scriptRunner": "pnpm", - "vitest.cliArguments": "--no-isolate", -} diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index ef3d03bb034..00000000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - // 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 963efe2f2d28bf44e3a53d6c9fea78d74a37441f Mon Sep 17 00:00:00 2001 From: Bertie690 Date: Thu, 7 Aug 2025 11:44:08 -0400 Subject: [PATCH 13/13] Added mention of alternate dev setup to `CONTRIBUTING.md` --- CONTRIBUTING.md | 43 +++++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2d56b868cff..b03ad647f1f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,7 +2,7 @@ Thank you for taking the time to contribute, every little bit helps. This project is entirely open-source and unmonetized - community contributions are what keep it alive! -Please make sure you understand everything relevant to your changes from the [Table of Contents](#-table-of-contents), and absolutely *feel free to reach out in the **#dev-corner** channel on [Discord](https://discord.gg/pokerogue)*. +Please make sure you understand everything relevant to your changes from the [Table of Contents](#-table-of-contents), and absolutely *feel free to reach out in the **#dev-corner** channel on [Discord](https://discord.gg/pokerogue)*. We are here to help and the better you understand what you're working on, the easier it will be for it to find its way into the game. ## 📄 Table of Contents @@ -16,19 +16,36 @@ We are here to help and the better you understand what you're working on, the ea ## 🛠️ Development Basics -PokéRogue is built with [Typescript](https://www.typescriptlang.org/docs/handbook/intro.html), using the [Phaser](https://github.com/phaserjs/phaser) game framework. +PokéRogue is built with [Typescript](https://www.typescriptlang.org/docs/handbook/intro.html), using the [Phaser](https://github.com/phaserjs/phaser) game framework. -If you have the motivation and experience with Typescript/Javascript (or are willing to learn) you can contribute by forking the repository and making pull requests with contributions. +If you have the motivation and experience with Typescript/Javascript (or are willing to learn), you can contribute by forking the repository and making pull requests with contributions. ## 💻 Environment Setup -### Prerequisites +### Codespaces/Devcontainer Environment -- node: >=22.14.0 - [manage with pnpm](https://pnpm.io/cli/env) | [manage with fnm](https://github.com/Schniz/fnm) | [manage with nvm](https://github.com/nvm-sh/nvm) +Arguably the easiest way to get started is by using the prepared development environment. + +We have a `.devcontainer/devcontainer.json` file, meaning we are compatible with: + +- [![Open in GitHub Codespaces][codespaces-badge]][codespaces-link], or +- the [Visual Studio Code Remote - Containers][devcontainer-ext] extension. + +This Linux environment comes with all required dependencies needed to start working on the project. + +[codespaces-badge]: +[codespaces-link]: +[devcontainer-ext]: + +### Local Development + +#### Prerequisites + +- node: >=22.14.0 - [manage with pnpm](https://pnpm.io/cli/env) | [manage with fnm](https://github.com/Schniz/fnm) | [manage with nvm](https://github.com/nvm-sh/nvm) | [manage with volta.sh](https://volta.sh/) - pnpm: 10.x - [how to install](https://pnpm.io/installation) (not recommended to install via `npm` on Windows native) | [alternate method - volta.sh](https://volta.sh/) - The repository [forked](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) and [cloned](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) locally on your device -### Running Locally +#### Running Locally 1. Run `pnpm install` from the repository root - *if you run into any errors, reach out in the **#dev-corner** channel on Discord* @@ -36,7 +53,7 @@ If you have the motivation and experience with Typescript/Javascript (or are wil ## 🚀 Getting Started -A great way to develop an understanding of how the project works is to look at test cases (located in [the `test` folder](./test/)). +A great way to develop an understanding of how the project works is to look at test cases (located in [the `test` folder](./test/)). Tests show you both how things are supposed to work and the expected "flow" to get from point A to point B in battles. *This is a big project and you will be confused at times - never be afraid to reach out and ask questions in **#dev-corner***! @@ -50,7 +67,7 @@ Most issues are bugs and are labeled with their area, such as `Move`, `Ability`, - `P2`: Minor - Incorrect (but non-crashing) move/ability/interaction - `P3`: No gameplay impact - typo, minor graphical error, etc. -Also under issues, you can take a look at the [List of Partial / Unimplemented Moves and Abilities](https://github.com/pagefaultgames/pokerogue/issues/3503) and the [Bug Board](https://github.com/orgs/pagefaultgames/projects/3) (the latter is essentially the same as the issues page but easier to work with). +Also under issues, you can take a look at the [List of Partial / Unimplemented Moves and Abilities](https://github.com/pagefaultgames/pokerogue/issues/3503) and the [Bug Board](https://github.com/orgs/pagefaultgames/projects/3). The latter is essentially the same as the issues page, so take your pick. You are free to comment on any issue so that you may be assigned to it and we can avoid multiple people working on the same thing. @@ -58,7 +75,7 @@ You are free to comment on any issue so that you may be assigned to it and we ca You can find the auto-generated documentation [here](https://pagefaultgames.github.io/pokerogue/main/index.html). -Additionally, the [docs folder](./docs) contains a variety of in-depth documents and guides useful for aspiring contributors. +Additionally, the [docs folder](./docs) contains a variety of in-depth documents and guides useful for aspiring contributors. \ Notable topics include: - [Commenting your code](./docs/comments.md) - [Linting & Formatting](./docs/linting.md) @@ -86,17 +103,17 @@ const overrides = { ``` Read through `src/overrides.ts` file to find the override that fits your needs - there are a lot of them! -If the situation you're trying to test can't be created using existing overrides (or with the [Dev Save](#-development-save-file)), reach out in **#dev-corner**. +If the situation you're trying to test can't be created using existing overrides (or with the [Dev Save](#-development-save-file)), reach out in **#dev-corner**. You can get help testing your specific changes, and you might have found a new override that needs to be created! ### 2 - Automatic Testing > PokéRogue uses [Vitest](https://vitest.dev/) for automatic testing. Checking out the existing tests in the [test](./test/) folder is a great way to understand how this works, and to get familiar with the project as a whole. -To make sure your changes didn't break any existing test cases, run `pnpm test:silent` in your terminal. You can also provide an argument to the command: to run only the Dancer (ability) tests, you could write `pnpm test:silent dancer`. +To make sure your changes didn't break any existing test cases, run `pnpm test:silent` in your terminal. You can also provide an argument to the command: to run only the Dancer (ability) tests, you could write `pnpm test:silent dancer`. - __Note that passing all test cases does *not* guarantee that everything is working properly__. The project does not have complete regression testing. -Most non-trivial changes (*especially bug fixes*) should come along with new test cases. +Most non-trivial changes (*especially bug fixes*) should come along with new test cases. - To make a new test file, run `pnpm test:create` and follow the prompts. If the move/ability/etc. you're modifying already has tests, simply add new cases to the end of the file. As mentioned before, the easiest way to get familiar with the system and understand how to write your own tests is simply to read the existing tests, particularly ones similar to the tests you intend to write. - Ensure that new tests: - Are deterministic. In other words, the test should never pass or fail when it shouldn't due to randomness. This involves primarily ensuring that abilities and moves are never randomly selected. @@ -108,3 +125,5 @@ Most non-trivial changes (*especially bug fixes*) should come along with new tes 1. Start the game up locally and navigate to `Menu -> Manage Data -> Import Data` 2. Select [everything.prsv](test/test-utils/saves/everything.prsv) (`test/test-utils/saves/everything.prsv`) and confirm. + +[] \ No newline at end of file