Skip to content

fix: document root preset in nested biome configs - #76

Open
brenttimmermans wants to merge 2 commits into
mainfrom
fix/biome-config-root-inheritance
Open

brenttimmermans wants to merge 2 commits into
mainfrom
fix/biome-config-root-inheritance

Conversation

@brenttimmermans

Copy link
Copy Markdown

Summary

The README told nested package configs to extend only react.biome.json with "root": false, but in Biome 2.x a nested config doesn't inherit the root biome.json. Those packages silently fall back to Biome's defaults (double quotes, semicolons, tabs) and lose the base linter rules. The README now tells package configs to extend root.biome.json alongside the framework preset.

We can't fix this in the presets themselves: Biome ignores extends inside an extended config, so react.biome.json can't pull in root.biome.json. Upstream treats this as by design (biomejs/biome#1867) and closed the feature request (discussion #8257). The "//" shorthand only works as a plain string, so it can't be combined with a preset either.

Changes

  • Monorepo section: correct how nested configs resolve, explain why presets can't include root, and update the package-level example to extend [root.biome.json, react.biome.json]
  • Config composition: root must be listed in every config that uses a framework preset, including nested ones

Testing

Tested in a throwaway monorepo on Biome 2.5.15, with the package installed from a packed tarball:

  • Nested config extending only react.biome.json: Biome defaults, and useBlockStatements doesn't fire
  • Nested config extending root + react: single quotes, no semicolons, 2 spaces; useHookAtTopLevel and useBlockStatements fire; files in the root .gitignore are still skipped
  • An extends inside a preset is silently ignored on 2.0.0, 2.2.0, 2.4.4 and 2.5.15, even when it points at a file that doesn't exist

Skills used

  • None

Checklist

  • Documented what's new
  • Added in-code documentation (wherever needed)
  • Wrote tests for new components/features
  • Added analytics (wherever needed)

🤖 Generated with Claude Code

A nested biome.json with "root": false does not inherit the parent
config in Biome 2.x, and Biome ignores extends inside an extended
config, so a package config extending only react.biome.json fell back
to Biome's defaults (double quotes, semicolons, tabs) and lost the base
linter rules. The monorepo section now tells package configs to extend
root.biome.json alongside the framework preset.
@brenttimmermans
brenttimmermans requested review from a team October 16, 2026 14:50
@brenttimmermans brenttimmermans self-assigned this Oct 16, 2026
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