Skip to content

fix(lint): migrate biome.json to Biome 2.4.0 schema — restore broken lint (LAC-2877)#39

Merged
lacymorrow merged 1 commit into
mainfrom
lac-2877/biome-2-schema-migration
Jul 20, 2026
Merged

fix(lint): migrate biome.json to Biome 2.4.0 schema — restore broken lint (LAC-2877)#39
lacymorrow merged 1 commit into
mainfrom
lac-2877/biome-2-schema-migration

Conversation

@lacymorrow

Copy link
Copy Markdown
Contributor

Paperclip issue

LAC-2877 — found during LAC-2792.

Problem

package.json pins @biomejs/biome@2.4.0 but biome.json was still on the 1.9.4 schema (plus removed keys like files.ignore). Every biome invocation exited with a configuration error, so bun run lint:biome / lint:fix:biome were dead. No CI job runs lint, so this failed silently for local/agent tooling only.

Changes

Config (biome.json)

  • Ran official biome migrate (1.9.4 → 2.4.0): files.ignorefiles.includes negations, organizeImportsassist.actions.source.organizeImports.
  • migrate converted noConsoleLog: warn into noConsole { allow: ["log"] }, which inverts the original intent (would allow console.log and flag everything else). Biome 2 has no "flag only log" mode, so set plain noConsole: "warn" (superset of old intent, still warn-level).
  • Excluded public/workers/**logger-worker.js is compiled TS output (__awaiter boilerplate) and shouldn't be linted.
  • Downgraded noArrayIndexKey error → warn, consistent with this config's existing warn-level suspicious rules (noExplicitAny, noNonNullAssertion); the 6 hits are static/decorative lists with no stable IDs.

Code — fixed all remaining error-level diagnostics surfaced by Biome 2.x

  • tests/setup.ts: suppression referenced lint/style/noVar, which moved to lint/suspicious/noVar in 2.x (parse error).
  • src/lib/utils/extract-headings.ts: replaced while ((match = regex.exec(...))) with for...of matchAll (fixes noAssignInExpressions + noImplicitAnyLet); braced a forEach callback (useIterableCallbackReturn).
  • scripts/nextjs-list-pages.ts: braced three forEach callbacks (useIterableCallbackReturn).
  • accordion-list.tsx: renamed exported AccordionItem interface → AccordionListItem — it shadowed the imported AccordionItem component (noRedeclare). No external importers (verified via grep).
  • component-details.tsx: backdrop div[role=button] → real <button type="button" aria-label="Close"> (useSemanticElements).
  • loader-atoms.tsx: added role="status" so aria-label is valid (useAriaPropsSupportedByRole); documented suppression for useSemanticElements (an <output> element would change the exported HTMLDivElement ref type).
  • terminal.tsx: documented suppression for noDangerouslySetInnerHtml — the converter is constructed with escapeXML: true, so input is escaped and only ansi-to-html's own color spans are injected.
  • masonry.tsx: alt text no longer contains the redundant word "image" (noRedundantAlt).

Scoped out (explicitly)

  • 395 pre-existing warn-level diagnostics (mostly noExplicitAny, noConsole, noArrayIndexKey) — non-blocking, exit code 0; existed conceptually under the 1.9.4 config too.
  • Repo-wide formatting/import-organization diffs that biome check --write would apply (~194 files) — orthogonal to restoring lint.

Testing

  • Reproduced the config error on main (Found 1 error: The configuration schema version does not match the CLI version 2.4.0).
  • bun run lint:biomeexit 0, Checked 271 files… Found 395 warnings, 6 infos, 0 errors.
  • biome check . loads config cleanly (no deserialize errors).
  • bun run typecheck → exit 0.
  • bun run test → 4/4 pass.

@vercel

vercel Bot commented Jul 20, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
bones Ready Ready Preview, Comment Jul 20, 2026 2:09pm

Request Review

@lacymorrow
lacymorrow force-pushed the lac-2877/biome-2-schema-migration branch from 0a92cbc to 2eb0fd5 Compare July 20, 2026 14:01
@github-actions

Copy link
Copy Markdown

Failed to generate code suggestions for PR

…or-level lint issues (LAC-2877)

- Run 'biome migrate' to update schema 1.9.4 -> 2.4.0 (files.ignore -> files.includes, organizeImports -> assist)
- Preserve old noConsoleLog intent: migrate emitted noConsole allow:[log] (inverted); set plain noConsole: warn instead
- Exclude public/workers/** (compiled TS output) from linting
- Downgrade noArrayIndexKey to warn to match existing warn-level suspicious rules
- Fix error-level diagnostics: suppression category (noVar moved to suspicious), useIterableCallbackReturn, noAssignInExpressions/noImplicitAnyLet via matchAll, noRedeclare (rename shadowing AccordionItem interface), a11y overlay div -> button, redundant alt text, aria-label without role
- Documented suppressions for escaped dangerouslySetInnerHTML (escapeXML: true) and div[role=status] keeping HTMLDivElement ref

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@lacymorrow
lacymorrow force-pushed the lac-2877/biome-2-schema-migration branch from 2eb0fd5 to 07b9481 Compare July 20, 2026 14:07
@lacymorrow
lacymorrow merged commit e4027bd into main Jul 20, 2026
6 of 7 checks passed
@lacymorrow
lacymorrow deleted the lac-2877/biome-2-schema-migration branch July 20, 2026 14:24
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