Skip to content

Track the current Biome release - #546

Merged
sehkone merged 1 commit into
mainfrom
sehkone/issue-545
Aug 6, 2026
Merged

Track the current Biome release#546
sehkone merged 1 commit into
mainfrom
sehkone/issue-545

Conversation

@sehkone

@sehkone sehkone commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Closes #545

Moves the Biome pin from 2.4.9 to latest (2.5.7 today), matching the rest of the organisation. Because Biome runs with --error-on-warnings here, the bump alone would turn CI red — 2.5.7 reports eleven findings 2.4.9 did not — so the fixes are included.

noUnsafeOptionalChaining ×4 (analytics.ts, attention.ts). The Array.isArray(config?.x) guard already proves the value is an array, but the branch re-evaluated config?.x, which the linter cannot narrow through. Each access is hoisted into a local; the as string[] cast stays, so inference and behaviour are unchanged.

useOptionalChain ×7. All !x || x.y !== "literal"x?.y !== "literal". Every subject is an object from a GraphQL or database result and every comparison is against a string literal, so the two forms cover the same inputs.

biome.json via biome migrate --write: schema 2.4.9 → 2.5.7, linter.rules.recommendedpreset (deprecated, removed in Biome 3.x).

Verification

  • biome ci --error-on-warnings . at 2.5.7: exit 0, Checked 412 files, no findings, no notices. Before the change: exit 1 with 7 warnings, 4 correctness findings, 2 deprecation notices.
  • pnpm run typecheck (tsc --noEmit): exit 0.

The pin sat at 2.4.9 while the rest of the organisation tracks latest.
Because Biome runs with --error-on-warnings here, moving the pin alone
turns CI red: 2.5.7 reports eleven findings that 2.4.9 did not. They
are worth fixing rather than pinning away.

noUnsafeOptionalChaining fired four times on the excluded-id sets. The
Array.isArray guard already proves the value is an array, but the
branch re-evaluated the optional chain, which the linter cannot narrow
through. Hoisting each access into a local settles it; the cast stays,
so inference and behaviour are unchanged.

useOptionalChain fired seven times on !x || x.y !== "literal". Every
subject is an object from a GraphQL or database result and every
comparison is against a string literal, so x?.y covers the same inputs.

biome.json is migrated to match what now runs: the declared schema had
drifted, and linter.rules.recommended is deprecated in favour of preset
and goes away in Biome 3.x.

Closes #545
@sehkone
sehkone merged commit bf7e76e into main Aug 6, 2026
10 checks passed
@sehkone
sehkone deleted the sehkone/issue-545 branch August 6, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Track the current Biome release

1 participant