Skip to content

chore: migrate biome.json to 2.x schema#517

Merged
coderdan merged 1 commit into
mainfrom
chore/biome-2-config
Jun 17, 2026
Merged

chore: migrate biome.json to 2.x schema#517
coderdan merged 1 commit into
mainfrom
chore/biome-2-config

Conversation

@coderdan

@coderdan coderdan commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Problem

Root package.json pins @biomejs/biome@^2.4.15, but biome.json still declared the 1.8.3 schema. biome 2.x renamed files.ignorefiles.includes (with negated globs), so the installed biome refuses to parse the config at all:

× Found an unknown key `ignore`.
× Biome exited because the configuration resulted in errors.

This breaks every biome entry point locally — pnpm code:fix (biome check --write) and the per-package lint scripts (biome check .) all fail before checking a single file. The binary was bumped to 2.x without migrating the config.

Fix

Ran biome migrate to convert the config to the 2.4.15 schema:

  • $schema2.4.15
  • files.ignore: [...]files.includes: ["**", "!...", ...] (biome 2.x's negated-glob form)
  • Adopted biome's own recommended folder-ignore form (!**/nix/store instead of !**/nix/store/**)

Faithful, behavior-preserving config migration — no lint rule changes. biome check biome.json now validates with zero warnings.

Scope / impact

  • No CI impact. biome is not invoked in any workflow (CI's lint:* steps are custom node scripts, not biome) — this only restores the local dev tooling.
  • biome 2.x does surface a backlog of pre-existing findings (it couldn't run before, so they were invisible). Addressing those — biome check --write for the auto-fixable formatting/import-sort changes, plus manual review of the rest — is intentionally out of scope for this config fix and should be a follow-up.

Verification

  • biome check biome.json → valid, 0 warnings
  • biome check now runs across the repo (previously crashed on config parse)

Summary by CodeRabbit

  • Chores
    • Updated code quality tool configuration to use the latest schema version and adjusted file inclusion patterns to optimize coverage while excluding specific directories.

Root pins @biomejs/biome@^2.4.15 but biome.json still used the 1.8.3
schema, so biome 2.x refused to parse it (`files.ignore` was renamed to
`files.includes` with negated globs). This broke `code:fix` and the
per-package `lint` scripts entirely.

Migrated via `biome migrate` and adopted biome's recommended folder-ignore
form for nix/store. Faithful config migration only — no rule or behavior
changes, and biome is not run in CI so this has no pipeline impact.
@coderdan coderdan requested a review from a team as a code owner June 17, 2026 03:15
@changeset-bot

changeset-bot Bot commented Jun 17, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f146e6e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 62cc4e1b-0b5d-4e5d-a843-74006657ed03

📥 Commits

Reviewing files that changed from the base of the PR and between 917b5c0 and f146e6e.

📒 Files selected for processing (1)
  • biome.json

📝 Walkthrough

Walkthrough

biome.json is updated to reference Biome schema version 2.4.15 (previously 1.8.3) and replaces the files.ignore array with a files.includes array that uses ** plus negated glob patterns to exclude package.json, .turbo/, dist, and nix/store.

Changes

Biome Configuration Update

Layer / File(s) Summary
Schema version and file filtering migration
biome.json
$schema URL updated to 2.4.15; files.ignore replaced with files.includes using ** and negated globs (!package.json, !.turbo/, !dist, !nix/store) to achieve equivalent exclusions.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐇 A schema so fresh, a version so new,
The globs flip to includes with a ! or two,
No dist, no turbo, no nix in the stew,
The biome bunny hops to 2.4.15 — wahoo!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely summarizes the main change: migrating biome.json from 1.x to 2.x schema, which is the primary objective of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/biome-2-config

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderdan coderdan merged commit 354b5d7 into main Jun 17, 2026
8 checks passed
@coderdan coderdan deleted the chore/biome-2-config branch June 17, 2026 04:44
coderdan added a commit that referenced this pull request Jun 17, 2026
Now that biome.json parses under biome 2.x (#517), run `biome check --write`
to clear the backlog of auto-fixable findings that were invisible while the
config was unparseable. Safe fixes only — formatting reflow plus safe lint
fixes (import sorting, etc.). The 351 unsafe fixes and the remaining
non-autofixable lint findings are intentionally left for manual follow-up.

Mechanical change; no behavior change. Verified: CLI suite (312 tests) and
script self-tests (20) pass; reformatted packages with credential-free unit
tests pass; the remaining monorepo test failures are pre-existing
DB-integration tests (Missing DATABASE_URL) that fail identically on the
base branch.
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.

2 participants