chore(tooling): make biome formatting actually run - #76
Merged
Conversation
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.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
# Conflicts: # src/app/globals.css
invisiblemask
changed the base branch from
chore/upgrade-next-16
to
restructure/iq-hiiq-scope
August 21, 2026 09:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
biome.jsonat all. Biome ran on pure defaults, which don't read.gitignore, sopnpm formatwalked 375 files — including.nextTurbopack output — and would have rewritten build artifacts. That one is my fault, introduced in 37e7e86..vscode/settings.jsonnever named Biome as the formatter. It only set the TypeScript SDK path. Noeditor.defaultFormatter, noformatOnSave— so the editor had no formatter for these files and nothing happened on save. This is the actual symptom..css, and Biome 1.9 keeps its CSS formatter off unless you explicitly enable it.src/app/globals.csshad therefore never been formatted by anything and had drifted into mixed tab/space indentation.Is it worth doing?
Yes. Cost is one config file, an editor settings patch and one glob character. It closes a real footgun (
pnpm formatcorrupting 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 touchedbiome.json:vcs.useIgnoreFile: true(scope 375 → 89 files), tabs, 80 cols, double quotes, organize-imports, andcss.formatter.enabled.vscode/settings.json:biomejs.biomeas default formatter withformatOnSave, plusquickfix.biomeandsource.organizeImports.biomeon save, and per-language overrides so nothing else claims js/ts/json/css.vscode/extensions.json: recommendsbiomejs.biomejson,jsonc,cssstyle— one-time reformat, kept in its own commit14 files, ~1.7k lines.
git diff -wreduces 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.BraindaoLogoalso gains the<title>its two siblings already carry, sobiome checkexits clean (lint/a11y/noSvgWithoutTitlewas the last remaining error).Verification
pnpm biome check .— 89 files, 0 errors (was 375 files / 290 errors beforebiome.json, 89 / 15 after)pnpm build— clean, compiled in 3.5s, TypeScript clean, both routes generatedglobals.css, confirming the glob change.ill .railresolvesstroke: rgb(35,35,38) / 1.6px / fill: none,.hero-ring-litresolvesanimation-name: hero-ring-orbitwithstroke-dasharray: 260px, 740px, all 9.illillustrations present, Satoshi and DM Sans loaded, console cleanNote
Kept at Biome 1.9.4 deliberately. Biome 2 renames the config keys touched here (
organizeImportsbecomes an assist action,files.ignorebecomesfiles.includes), so it belongs in its own PR rather than riding along with a formatting fix.Rebased on the updated base
chore/upgrade-next-16moved (it absorbed the 48 commits of #73's hiIQ page rewrite), so that merge is propagated here. One conflict, insrc/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.cssis 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 buildclean after the merge;biome check .exits 0.