Skip to content

chore(tooling): make biome formatting actually run - #76

Merged
invisiblemask merged 3 commits into
restructure/iq-hiiq-scopefrom
chore/biome-formatting
Aug 21, 2026
Merged

chore(tooling): make biome formatting actually run#76
invisiblemask merged 3 commits into
restructure/iq-hiiq-scopefrom
chore/biome-formatting

Conversation

@invisiblemask

@invisiblemask invisiblemask commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Closes https://github.com/IQIndustries/issues/issues/5218 when this PR merged

Stacked on #74 (chore/upgrade-next-16). Review that one first.

Why formatting never happened on its own

The previous commit swapped prettier for Biome but only replaced the npm script. Four things were left unwired:

  1. There was no biome.json at all. Biome ran on pure defaults, which don't read .gitignore, so pnpm format walked 375 files — including .next Turbopack output — and would have rewritten build artifacts. That one is my fault, introduced in 37e7e86.
  2. .vscode/settings.json never named Biome as the formatter. It only set the TypeScript SDK path. No editor.defaultFormatter, no formatOnSave — so the editor had no formatter for these files and nothing happened on save. This is the actual symptom.
  3. CSS was out of scope twice over. The lint-staged glob didn't list .css, and Biome 1.9 keeps its CSS formatter off unless you explicitly enable it. src/app/globals.css had therefore never been formatted by anything and had drifted into mixed tab/space indentation.
  4. Nothing recommended the extension, so a fresh clone reproduces the problem.

Is it worth doing?

Yes. Cost is one config file, an editor settings patch and one glob character. It closes a real footgun (pnpm format corrupting build output), it fixes a bug I introduced in the previous PR, and formatting is only useful if it's automatic — a formatter you have to remember to invoke is a formatter that produces noisy diffs.

Changes

chore(tooling) — config only, no source touched

  • biome.json: vcs.useIgnoreFile: true (scope 375 → 89 files), tabs, 80 cols, double quotes, organize-imports, and css.formatter.enabled
  • .vscode/settings.json: biomejs.biome as default formatter with formatOnSave, plus quickfix.biome and source.organizeImports.biome on save, and per-language overrides so nothing else claims js/ts/json/css
  • .vscode/extensions.json: recommends biomejs.biome
  • lint-staged glob widened to json,jsonc,css

style — one-time reformat, kept in its own commit

14 files, ~1.7k lines. git diff -w reduces it to quote and semicolon changes plus expanding CSS one-liners; nothing semantic. The bulk is machine-generated SVG-to-JSX dumps and the hiIQ ABI. Reformatting once beats ignoring them — the next person to touch an icon gets a one-line diff instead of a 400-line one.

BraindaoLogo also gains the <title> its two siblings already carry, so biome check exits clean (lint/a11y/noSvgWithoutTitle was the last remaining error).

Verification

  • pnpm biome check . — 89 files, 0 errors (was 375 files / 290 errors before biome.json, 89 / 15 after)
  • pnpm build — clean, compiled in 3.5s, TypeScript clean, both routes generated
  • lint-staged fired on 14 staged files including globals.css, confirming the glob change
  • Dev server renders the page correctly; computed styles verified for the rules with the largest diffs — .ill .rail resolves stroke: rgb(35,35,38) / 1.6px / fill: none, .hero-ring-lit resolves animation-name: hero-ring-orbit with stroke-dasharray: 260px, 740px, all 9 .ill illustrations present, Satoshi and DM Sans loaded, console clean

Note

Kept at Biome 1.9.4 deliberately. Biome 2 renames the config keys touched here (organizeImports becomes an assist action, files.ignore becomes files.includes), so it belongs in its own PR rather than riding along with a formatting fix.

Rebased on the updated base

chore/upgrade-next-16 moved (it absorbed the 48 commits of #73's hiIQ page rewrite), so that merge is propagated here. One conflict, in src/app/globals.css: the base added ~202 lines of illustration and slider CSS to a file this PR reformats wholesale. Resolved by taking the base's content in full and re-running the formatter over it — verified byte-identical to the base once whitespace and quote style are normalised, so nothing was dropped in the resolution.

The 18 files the base brought in already satisfy biome.json (biome check . is clean over all 101 files). They were written after lint-staged was already formatting .tsx, and Biome's defaults happen to match the config here. globals.css is the exception precisely because CSS was outside the lint-staged glob and Biome 1.9's CSS formatter is off by default — the two gaps this PR closes.

pnpm build clean after the merge; biome check . exits 0.

Biome was running on pure defaults: no biome.json existed, so
`pnpm format` walked 375 files and happily rewrote .next build output,
and the editor had no idea Biome was the formatter at all — hence
formatting only ever happening by hand.

- add biome.json: honour .gitignore (375 files in scope -> 89), tabs,
  80 cols, double quotes, organize-imports, and CSS formatting, which
  Biome 1.9 leaves off unless asked
- point .vscode at biomejs.biome with formatOnSave plus quickfix and
  organize-imports on save, and recommend the extension
- widen the lint-staged glob to jsonc and css so globals.css is covered
One-time reformat now that biome.json exists and CSS is in scope. Pure
whitespace, quote and semicolon churn in machine-generated SVG-to-JSX
dumps, the hiIQ ABI and globals.css, which had never been formatted at
all and had drifted into mixed tab/space indentation.

BraindaoLogo gains the <title> its two siblings already carry so
`biome check` exits clean.
@vercel

vercel Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
braindao-ui Ready Ready Preview Aug 21, 2026 8:54am

Request Review

@invisiblemask
invisiblemask changed the base branch from chore/upgrade-next-16 to restructure/iq-hiiq-scope August 21, 2026 09:27
@invisiblemask
invisiblemask merged commit 4c53cb1 into restructure/iq-hiiq-scope Aug 21, 2026
2 checks passed
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