diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index e93fd88f..6a4a7660 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -28,7 +28,7 @@ "-AmazonWebServices.aws-toolkit-vscode", // the AWS CLI feature installs this automatically, but it's causing problems in VS Code // basic tooling // "eamodio.gitlens@15.5.1", - "coderabbit.coderabbit-vscode@0.21.9", + "coderabbit.coderabbit-vscode@0.23.0", "ms-vscode.live-server@0.5.2025051301", "MS-vsliveshare.vsliveshare@1.0.5905", "anthropic.claude-code@2.1.283", @@ -71,5 +71,5 @@ "initializeCommand": "sh .devcontainer/initialize-command.sh", "onCreateCommand": "sh .devcontainer/on-create-command.sh", "postStartCommand": "sh .devcontainer/post-start-command.sh" - // Devcontainer context hash (do not manually edit this, it's managed by a pre-commit hook): 85e48e15 # spellchecker:disable-line + // Devcontainer context hash (do not manually edit this, it's managed by a pre-commit hook): 88f0aac3 # spellchecker:disable-line } diff --git a/.devcontainer/on-create-command-boilerplate.sh b/.devcontainer/on-create-command-boilerplate.sh index 31e70884..3e70922b 100644 --- a/.devcontainer/on-create-command-boilerplate.sh +++ b/.devcontainer/on-create-command-boilerplate.sh @@ -7,3 +7,25 @@ git config --global --add --bool push.autoSetupRemote true git config --local core.symlinks true sh .devcontainer/create-aws-profile.sh + +# The Biome VS Code extension starts a session per workspace folder and warns when folders nest. The root folder's +# session already covers the nested ones, so Biome is switched off in their (gitignored) folder settings. +root_folder_path="." +for workspace_file in *.code-workspace; do + if [ ! -f "$workspace_file" ]; then + continue + fi + folders=$(sed -n 's/^[[:space:]]*"path":[[:space:]]*"\([^"]*\)".*/\1/p' "$workspace_file") + if ! echo "$folders" | grep -qxF "$root_folder_path"; then + continue + fi + printf '%s\n' "$folders" | while IFS= read -r folder; do + case "$folder" in + .. | ../* | /*) continue ;; + esac + if [ "$folder" != "$root_folder_path" ] && [ -d "$folder" ] && [ ! -e "$folder/.vscode/settings.json" ]; then + mkdir -p "$folder/.vscode" + echo '{ "biome.enabled": false }' >"$folder/.vscode/settings.json" + fi + done +done diff --git a/template/.devcontainer/devcontainer.json.jinja-base b/template/.devcontainer/devcontainer.json.jinja-base index b92ef7b1..f2e64b45 100644 --- a/template/.devcontainer/devcontainer.json.jinja-base +++ b/template/.devcontainer/devcontainer.json.jinja-base @@ -34,7 +34,7 @@ "-AmazonWebServices.aws-toolkit-vscode", // the AWS CLI feature installs this automatically, but it's causing problems in VS Code{% endraw %}{% endif %}{% raw %} // basic tooling // "eamodio.gitlens@15.5.1", - "coderabbit.coderabbit-vscode@0.21.9", + "coderabbit.coderabbit-vscode@0.23.0", "ms-vscode.live-server@0.5.2025051301", "MS-vsliveshare.vsliveshare@1.0.5905",{% endraw %}{% if install_claude_cli %}{% raw %} "anthropic.claude-code@2.1.283",{% endraw %}{% endif %}{% raw %}{% endraw %}{% if (is_child_of_copier_base_template is defined and is_child_of_copier_base_template is sameas(true)) or (is_child_of_copier_base_template is not defined and template_uses_python is defined and template_uses_python is sameas(true)) %}{% raw %}