Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ When changing the mapping in [`packages/opencode-models-info/src/mapping.ts`](pa

- **Default shell is zsh** on this laptop. `bash -c` scripts in tooling should stay POSIX-portable or be invoked under zsh explicitly.
- **`gh` auth** lives in the interactive zsh profile. If `gh` looks unauthenticated under a plain non-interactive shell, retry under `zsh -i -c '…'` — `GITHUB_TOKEN` is loaded from `.zshrc`.
- **Biome ignores `**/.claude`** in `biome.json`. The Claude Code worktree path lives under `.claude/worktrees/<id>/`, which means running `pnpm lint` from a worktree silently lints zero files. Lint per-package (`pnpm --filter <pkg> exec biome lint .`) from a worktree, or run the workspace lint from the main checkout.
- **Biome and the `.claude` worktree path.** `biome.json` excludes `**/.claude`, and Claude Code worktrees live under `.claude/worktrees/<id>/`. A bare `biome … .` therefore self-excludes (the `.` arg resolves under `.claude`) and silently processes **zero** files. To avoid that trap, the root `lint` / `format` / `format:check` scripts pass **explicit paths** (`packages test-env *.json`) instead of `.` — Biome evaluates `includes` relative to `biome.json`, so those relative paths never hit the `.claude` exclusion and the scripts work identically from a worktree or the main checkout. If you add a new top-level lintable directory, add it to those three scripts (otherwise it won't be checked).
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Update the documentation to reflect the explicit JSON filenames (package.json biome.json tsconfig.base.json) instead of the *.json glob pattern for accuracy and consistency with the updated package.json scripts.


## Design docs and plans

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
"packageManager": "pnpm@11.3.0",
"scripts": {
"build": "pnpm -r build",
"lint": "biome lint .",
"lint": "biome lint packages test-env *.json",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Biome does not natively support glob expansion (like *.json) in CLI arguments. On Windows environments using shells that do not perform glob expansion (such as cmd.exe), passing *.json literally to Biome will cause it to fail with an error. To ensure cross-platform compatibility, explicitly list the root JSON files instead of using a wildcard.

Suggested change
"lint": "biome lint packages test-env *.json",
"lint": "biome lint packages test-env package.json biome.json tsconfig.base.json",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid shell-only globs in package scripts

On Windows, pnpm scripts run under cmd.exe by default, which does not expand *.json; Biome also documents that “Glob patterns used on the command line are not interpreted by Biome” and are expanded by the shell (https://next.biomejs.dev/guides/configure-biome/#include-files-via-cli). In that environment this script passes a literal *.json path, so root JSON files are not linted and the command may fail instead of providing the intended cross-platform gate; the same pattern is used in the format scripts below.

Useful? React with 👍 / 👎.

"typecheck": "pnpm -r typecheck",
"test": "pnpm -r test",
"test:env:up": "docker compose -f test-env/docker-compose.yml up -d --wait",
"test:env:down": "docker compose -f test-env/docker-compose.yml down -v",
"test:integration:run": "INTEGRATION_MODELS_INFO_URL=${INTEGRATION_MODELS_INFO_URL:-http://127.0.0.1:18080/v1/models} pnpm -r --if-present test:integration",
"test:integration": "pnpm test:env:up && (pnpm test:integration:run; status=$?; pnpm test:env:down; exit $status)",
"format": "biome format --write .",
"format:check": "biome format ."
"format": "biome format --write packages test-env *.json",
"format:check": "biome format packages test-env *.json"
Comment on lines +16 to +17
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similarly, replace the *.json glob with explicit filenames to prevent failures on Windows shells (like cmd.exe) that do not perform glob expansion.

Suggested change
"format": "biome format --write packages test-env *.json",
"format:check": "biome format packages test-env *.json"
"format": "biome format --write packages test-env package.json biome.json tsconfig.base.json",
"format:check": "biome format packages test-env package.json biome.json tsconfig.base.json"

},
"devDependencies": {
"@biomejs/biome": "2.4.15",
Expand Down