Skip to content

fix(templates): update the Biome addon to Biome 2.6 - #1289

Merged
AmanVarshney01 merged 2 commits into
mainfrom
fix/biome-2-6
Oct 22, 2026
Merged

AmanVarshney01 merged 2 commits into
mainfrom
fix/biome-2-6

Conversation

@AmanVarshney01

@AmanVarshney01 AmanVarshney01 commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

Summary

Every project created with --addons biome is broken right now. The addon installs @biomejs/biome@^2.5.15, which resolves to 2.6.2 (released 2026-10-21). Biome 2.6 rejects our config:

biome.json:45:9 × Found an unknown key `useSortedClasses`
Biome exited because the configuration resulted in errors.

biome check fails, and the Biome editor extension doesn't start. This was found while verifying #809.

Fix

Biome 2.6 renamed nursery.useSortedClasses to nursery.useTailwindSortedClasses and moved its function list to a top-level tailwind section. Biome's defaults there already cover our clsx, cn and cva, plus twMerge, twJoin, tw, tv and others, so the template sets no list and uses the defaults:

"nursery": { "useTailwindSortedClasses": { "level": "warn", "fix": "safe" } }

biome migrate --write produced the same rule rename. It also carried our old explicit function list over, which would have replaced Biome's wider defaults, so that part is left out. The addon now requires ^2.6.2.

Regression coverage

No generated-build sample used the Biome addon, so the daily run didn't catch this. This PR adds tanstack-router-biome and svelte-biome (Svelte and Nuxt use the config's overrides block), plus a probe that runs biome format --write .. That command exits non-zero only when Biome can't load its config.

Verification

  • With Biome 2.6.2, the old config makes biome format --write . exit 1, and the new config exits 0.
  • Fresh React, SvelteKit and Nuxt projects with the addon run on Biome 2.6.2 with no config errors. Their bun run check results match Biome 2.5.15 with the old config exactly, so the upgrade adds no new findings.
  • Class sorting still works with Biome's defaults. Unsorted classes in cn(...), cva(...), twMerge(...) and tv(...) are all reported as useTailwindSortedClasses.
  • bun run check is clean, test:ci passes 112 of 112, and the two new samples pass.

Not in this PR

A fresh TanStack Router project still fails its own bun run check with 4 errors on both Biome 2.5 and 2.6:

  • 3 accessibility rules in the vendored shadcn input-group.tsx and label.tsx
  • noBannedTypes for {} in packages/api/src/context.ts

These existed before this PR. Svelte and Nuxt projects pass.

Summary by CodeRabbit

  • New Features

    • Added TanStack Router and Svelte project templates with Bun, Hono, oRPC, Biome, and Turborepo configurations.
    • Updated the Tailwind class-sorting rule in Biome configurations.
  • Bug Fixes

    • Generated projects now validate their Biome configuration during build verification, helping catch setup issues earlier.

Biome 2.6 renamed nursery.useSortedClasses to useTailwindSortedClasses
and moved its function list to a top-level tailwind config. The Biome
addon installs ^2.5.15, which now resolves to 2.6.2, so every new project
with the addon got "Found an unknown key useSortedClasses", biome check
exited with a configuration error and the editor extension failed to start.

The config now matches what `biome migrate` produces for it, and the
addon requires ^2.6.2. clsx and cn are merge functions and cva is a
variant function, so class sorting still covers all three.

Generated builds had no Biome sample, so this went unnoticed. Add
tanstack-router and svelte samples with the addon, and a probe that runs
`biome format --write .`, which fails when Biome can't load its config.
@vercel

vercel Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
create-better-t-stack-web Ready Ready Preview Oct 22, 2026 7:49am UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T22:48:14.710019Z 4c63018 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 574e6107-d967-48d2-9196-ca75a05642c9
📥 Commits

Reviewing files that changed from the base of the PR and between 4c63018 and 9c0bc85.

⛔ Files ignored due to path filters: 1
  • packages/template-generator/src/templates.generated.ts is excluded by !**/*.generated.*
📒 Files selected for processing: 1
  • packages/template-generator/templates/addons/biome/biome.json.hbs
💤 Files with no reviewable changes: 1
  • packages/template-generator/templates/addons/biome/biome.json.hbs

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Walkthrough

The Biome dependency version and addon rule configuration changed. Generated build samples now include TanStack Router and Svelte variants. After dependency installation, generated build tests run Biome formatting for samples with the Biome addon.

Changes

Biome configuration and generated builds

Layer / File(s) Summary
Update Biome addon configuration
packages/template-generator/src/utils/add-deps.ts, packages/template-generator/templates/addons/biome/biome.json.hbs
The Biome dependency version changed to ^2.6.2. The template now uses useTailwindSortedClasses and removes the explicit function options for clsx, cva, and cn.
Add generated samples and Biome validation
apps/cli/test/generated-builds/samples.ts, apps/cli/test/generated-builds.test.ts, apps/cli/test/generated-builds/probes.ts
TanStack Router and Svelte samples use the Biome and Turborepo addons. After dependency installation, the tests run the local Biome formatter for samples with the Biome addon.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 9c0bc

No outstanding issue is established for the Biome update or generated-build validation. The change is ready to merge after normal checks.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: updating the Biome template addon to Biome 2.6.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 4 files. (1 skipped: 1 …
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 4 files. (1 skipped: 1 unsupported.)

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 70399950-d972-4841-a798-0a5be563173f
📥 Commits

Reviewing files that changed from the base of the PR and between 09edd06 and 4c63018.

⛔ Files ignored due to path filters: 1
  • packages/template-generator/src/templates.generated.ts is excluded by !**/*.generated.*
📒 Files selected for processing: 5
  • apps/cli/test/generated-builds.test.ts
  • apps/cli/test/generated-builds/probes.ts
  • apps/cli/test/generated-builds/samples.ts
  • packages/template-generator/src/utils/add-deps.ts
  • packages/template-generator/templates/addons/biome/biome.json.hbs

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review.

Setting tailwind.mergeFunctions and variantFunctions replaces Biome's
defaults, which already include clsx, cn and cva plus twMerge, twJoin,
tw, tv and others. The explicit lists dropped class sorting for twMerge
and tv, so remove them.
@AmanVarshney01
AmanVarshney01 merged commit 6be41da into main Oct 22, 2026
11 checks passed
@AmanVarshney01
AmanVarshney01 deleted the fix/biome-2-6 branch October 22, 2026 12:56

This branch was successfully deployed

1 active deployment
Preview — 9c0bc856 Deployed Oct 22, 2026 by vercel[bot]
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