Skip to content

Format and lint the code with Biome, and leave the documents alone - #1

Merged
ken0nek merged 2 commits into
mainfrom
biome
Sep 3, 2026
Merged

ken0nek merged 2 commits into
mainfrom
biome

Conversation

@ken0nek

@ken0nek ken0nek commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Two commits. The first is mechanical, the second is the one worth reading.

commit what
0464ab5 biome.json, the four scripts, and biome check --write . over 130 files. No behavior change.
db92bb1 The linter's 27 findings answered by hand, plus pnpm check:ci as a third CI job. 20 files.

0464ab5 reproduces from its own config: check out its parent, apply its
biome.json and package.json, run pnpm check, and you get its tree
byte-for-byte.

The corpus is exempt from the formatter, and only the formatter

fixtures/, recipes/, registries/ and docs/schema/ are authored by hand
in a shape no formatter produces — leaf objects on one line, key order carrying
meaning. Two of those files are read byte-for-byte by the drift checks, as is
the generated gear-labels.ts. Biome still lints all of them for JSON errors;
it just does not reprint them. Nothing under those paths changed in either
commit.

Rules that are off, and why

Repo-wide, because the compiler settings already create what they ask for:

  • noNonNullAssertion — every ! in the tree exists because
    noUncheckedIndexedAccess is on. Warning on the assertions the flag creates
    is noise, not signal.
  • useLiteralKeys — bracket access is what reading untyped JSON is made of.

Tests additionally waive a11y (the probe components exist to be clicked by
jsdom, not read by a person) and the two rules that the prototype-pollution and
generator-output assertions trip on purpose.

Fixed rather than waived

[^] spelled as [\s\S], forEach callbacks that returned their body's
value, void functions that returned an expression, a memo assignment hidden
inside a return, two buttons without a type, two dead imports, two hand-rolled
optional chains, six concatenations that wanted a template, and a CSS rule that
preceded the less specific selector it overrode. One suppression remains, on
JSON Schema's then keyword, which is not a thenable.

Gating now

pnpm check:ci lands in db92bb1, the commit where it first passes — the
formatting commit does not claim a gate it cannot hold. Gating at zero is the
point: a lint script that nothing runs is a cleanup someone owes later.

Verified

biome ci exit 0 · 1597 harness checks, 0 failures · 1079 tests across the
three workspaces · the site builds.

Biome formats and lints TypeScript, JSX, JavaScript and CSS. `pnpm check`
writes the fixes, `pnpm check:ci` reads without writing, and `biome.json` is
the whole configuration. Everything below the first paragraph of this message
is `biome check --write .` over 130 files and nothing else: no behavior
changes, and the diff reproduces from the config.

The corpus is exempt from the formatter and only the formatter. `fixtures/`,
`recipes/`, `registries/` and `docs/schema/` are authored by hand in a shape no
formatter produces — leaf objects on one line, key order carrying meaning — and
two of those files are read byte-for-byte by the drift checks, as is the
generated `gear-labels.ts`. Biome still lints them for JSON errors; it just
does not reprint them.

Two rules are off, because the compiler already covers what they ask for.
`noNonNullAssertion` fires on the assertions `noUncheckedIndexedAccess`
creates, and `useLiteralKeys` fires on the bracket access that reading untyped
JSON is made of. Tests additionally waive `a11y`, whose probe components exist
to be clicked by jsdom, and the two rules that the prototype-pollution and
generator-output assertions trip on purpose.

The linter still has findings to clear; it is not gated in CI yet.
Fixed rather than waived: `[^]` spelled as `[\s\S]`, `forEach` callbacks that
returned their body's value, `void` functions that returned an expression, a
memo assignment hidden inside a return, two buttons without a type, two dead
imports, two hand-rolled optional chains, six concatenations that wanted a
template, and a CSS rule that preceded the less specific selector it overrode.
The single suppression left in the tree is on JSON Schema's `then` keyword,
which is not a thenable.

With nothing left to report, `pnpm check:ci` becomes a third job on the
validate workflow. Gating it now, while the count is zero, is the point: a
lint script that nothing runs is a cleanup someone owes later.
@ken0nek ken0nek self-assigned this Sep 3, 2026
@ken0nek
ken0nek merged commit e80652e into main Sep 3, 2026
3 checks passed
@ken0nek
ken0nek deleted the biome branch September 3, 2026 08:04
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