Skip to content

chore: adopt the canonical biome lint+format gate - #15

Merged
nicodes merged 1 commit into
mainfrom
chore/biome
Sep 21, 2026
Merged

nicodes merged 1 commit into
mainfrom
chore/biome

Conversation

@nicodes

@nicodes nicodes commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

What changed

Adopts the fleet's canonical lint+format gate (cicd PR #45 @ e59a84d3):

  • biome.json copied byte-verbatim from nicodes/cicd templates/static-web/biome.json (sha256 2464c8cc…f91a5, matches the archetype). Zero per-repo divergence.
  • @biomejs/biome added as an exact devDependency 2.5.14 (no range); bun.lock carries it; bun install --frozen-lockfile verified clean.
  • .github/actions/test: the archetype's Lint and format are canonical step (bun x biome check) added as the FIRST step, before all dist assertions, with the archetype's comment adapted minimally (this repo pins in package.json; the frozen install runs in ../build earlier in the same job). The action description's step-order prose updated (the gate is a source assertion, not a dist property). All existing per-repo assertions (three-page check, no-JS) untouched.

Biome findings and how they were handled

First run: 8 errors, 8 warnings, 1 info across 13 files.

  • The 8 errors were 5 format + 3 organizeImports findings — the expected first-run churn (tab indentation, 120-col joins, import reordering). Fixed with bun x biome check --write (safe fixes only) and the diff inspected: frontmatter-only changes in the .astro files (import order, one-line arrow joins), template HTML untouched, CSS re-indented. That churn is the visible part of this diff.
  • The 8 warnings were NOT silenced (no suppressions, no config edits):
    • 5× lint/correctness/noUnusedImports on Full/Entry imports in the three pages — false positives: the components are used in the page templates, and Biome analyses .astro frontmatter only. Left visible as warnings; bun x biome check exits 0 on warnings, so the gate is green without suppressions. NOTE for cicd: the canonical **/*.astro override disables noUnusedVariables but not noUnusedImports, so every adopter with template-used component imports sees these; an archetype-side addition of noUnusedImports: "off" (or equivalent) to that override would clear them fleet-wide.
    • 3× lint/complexity/noImportantStyles on the prefers-reduced-motion block in global.css — the !important declarations are intentional (the block must beat every other rule to actually reduce motion). Biome's own fix is marked unsafe (it would delete them). Left visible as warnings.
  • The 1 info is a config-deserialize notice on the canonical biome.json itself: "recommended": true is deprecated in Biome 2.5.14 in favour of "preset" (biome migrate). Info-level, non-failing, fleet-wide — for cicd to act on in the archetype, not for per-repo edits (byte-verbatim rule).

Sibling evidence (verified locally): tonesplit-web and ctcalc-web, both mid-adoption, hit the identical finding classes (unused-import false positives, reduced-motion !important, the deprecation info).

Local gates (bun 1.4.1)

  • bun x biome check: exit 0 (8 non-failing warnings + 1 info remain visible).
  • bun install --frozen-lockfile: clean. bun run typecheck: 7 files, 0 errors/warnings/hints. bun run build: 3 pages; index/devtools/games non-empty; no *.js in dist. actionlint: clean on both workflows.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@vercel

vercel Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
aviorstudio-web Ready Ready Preview Sep 21, 2026 11:02pm UTC

@nicodes
nicodes merged commit b5f417e into main Sep 21, 2026
6 checks passed
@nicodes
nicodes deleted the chore/biome branch September 21, 2026 23:03

This branch was successfully deployed

1 active deployment
Preview — 8dbb61b2 Deployed Sep 21, 2026 by vercel[bot]
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.

1 participant