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..4ce39f3c27c --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,11 @@ +{ + "recommendations": [ + "biomejs.biome", + "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..733bbb932f7 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,34 @@ +{ + // # 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 + "typescript.autoClosingTags": false, + + // # Miscellaneous + "npm.packageManager": "pnpm", + "npm.scriptRunner": "pnpm", + "vitest.cliArguments": "--no-isolate", +} 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 diff --git a/biome.jsonc b/biome.jsonc index d2f7c711dc9..a63ce0ee07d 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -36,7 +36,6 @@ "!**/src/data/balance/tms.ts" ] }, - "assist": { "actions": { "source": {