chore(biome): upgrade @biomejs/biome v1 → v2.4.13 #408
No reviewers
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks!408
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "chore/biome-v2"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Major bump that lands the v2 line. #407 already pinned
bun x @biomejs/biome@^1; this PR bumps the caret to^2, runsbiome migrate --writeon the config, applies every safe + unsafe auto-fix v2 emits across the workspace, and disables the new lint rules that v2'srecommended: truelights up — so the upgrade ships without a parallel codebase rewrite.Stack on top of #407 (this branch was cut from
fix/precommit-biome-resolution).Config changes (
biome.json)$schema→2.4.13.organizeImports.enabled: true→assist.actions.source.organizeImports: "on".overrides[].include→overrides[].includes.files.ignore: [...]→files.includes: ["**", "!**/path", …](negation patterns).css.parser.tailwindDirectives: trueso the v2 CSS parser stops rejecting@theme { … }inapps/web/src/styles/index.css.!**/.claudeto the includes ignore list — the worktree scratch dirs were being scanned and noisy.Disabled v2 rules (follow-up scope)
recommended: trueenabled several new rules that fire on real patterns we don't want to refactor in the same PR. Each is a legitimate guideline; tracking re-enable + fix as separate issues per category:a11y/useAriaPropsSupportedByRolea11y/noStaticElementInteractionssuspicious/noArrayIndexKeysuspicious/noTemplateCurlyInStringcorrectness/noInnerDeclarationsapps/web/index.htmlinline scriptperformance/noDeletedelete process.env.Xin test cleanupCode changes
"@biomejs/biome": "^2.4.13".bun x @biomejs/biome@^1→^2inpackage.json(root + apps/web) andjustfile(lint,fmt,fmt-check,lint-fix).biome check --write(import sort, optional chains, simplifications).biome check --write --unsafe(unused-var rename to_var).<></>no-op return withnullinapps/web/src/routes/agents.tsx; widen function return type toReactElement | null.biome-ignoresuppressions whose underlying rules are now disabled or no longer fire (cost-sparkline.tsx,LabelMultiSelect.tsx,monitor.index.tsx,TestFireModal.tsx,flows-retention.test.ts,sweeper.test.ts).Test plan
just lint→Checked 422 files in 205ms. No fixes applied.just fmt-check→Checked 421 files in 73ms. No fixes applied.just typecheck→ 4/4 turbo tasks ok.bun test apps/server/src/→ 1994 pass / 5 fail. The 5 failures are pre-existing on main (verified withgit stash+ re-run on the unmodified tree) — unrelated to the upgrade.#407first, then rebases this ontomain— diff after rebase should be the same minus the^1/^2swap (already covered here).🤖 Generated with Claude Code
bun x biomeinvocationContainer worktrees have no `node_modules/`, so `bun x biome ...` resolved the bare `biome` npm package — an unrelated tool that exits 0 silently without touching files. The husky pre-commit hook (`bun x lint-staged` → `bun x biome check --write`) therefore lied: every commit looked formatted but landed unformatted, and CI then caught the issue on the Forgejo Actions runner. Reproduced inside `claude-hooks-dev-default`: $ echo "const x =1" > test.ts $ bun x biome check --write test.ts exit=0 $ cat test.ts const x =1 # untouched After pin: $ bun x @biomejs/biome@^1 check --write test.ts Checked 1 file in 1282µs. Fixed 1 file. exit=0 $ cat test.ts const x = 1; Replaces `bun x biome` with `bun x @biomejs/biome@^1` in: - root `package.json` scripts (qa, lint, lint:fix, fmt, fmt:check) and `lint-staged` config - `apps/web/package.json` lint script - `justfile` recipes (lint, fmt, fmt-check, lint-fix) The `^1` semver caret matches the existing devDependency pin (`@biomejs/biome ^1.9.0`); a v2 upgrade is a separate PR with its own config migration + rule cleanup. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>ecb6cb62214663ca3c99