Repository navigation
Replies: 3 comments 7 replies
ESlint v10 was a big change because it removed the possibility of recursive configurations; instead, they went for a flattening strategy. We don't want to make the same mistakes. Recursive configurations are difficult to debug. |
3 replies
|
Another use case that is not possible because of this limitation: Extending a third-party Biome preset like ultracite in a company-wide preset, which is then extended in the company's projects. Because grandparents are not supported, we have to:
|
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Introduction
I’m proposing support for recursive
extendsinbiome.json. Right now, Biome only resolves one level, which forces us to duplicate configs and makes it harder to stay modular.Use Case
We want a base Biome config and then layer more specific configs on top of it, like a UI config.
~/sablier/devkit/biome/base.jsonc{ "$schema": "https://biomejs.dev/schemas/latest/schema.json", "formatter": { "enabled": true, "lineWidth": 100 }, "linter": { "enabled": true, "rules": { "recommended": true } } }~/sablier/devkit/biome/ui.jsonc{ "$schema": "https://biomejs.dev/schemas/latest/schema.json", "extends": ["./base.jsonc"], "linter": { "rules": { "a11y": { "recommended": true } } } }Consuming project (
project/biome.json){ "extends": ["@sablier/devkit/biome/ui"], "files": { "includes": ["src/**/*.ts"] } }The Problem
I'd expect
project/biome.jsonto inherit bothui.jsoncandbase.jsonc. But Biome stops after one level, so anything inbase.jsoncgets ignored unless I manually copy it intoui.jsonc.This leads to duplication and extra maintenance.
Proposed Solution
Make
extendswork recursively. When a config extends another, Biome should follow the chain all the way up and merge everything. The most specific config should always win.Existing Issues
Related requests exist (#1867, #3950, #2257), but they’re marked “not planned.” Given how common recursive config hierarchies are in other tools, it feels worth revisiting.
All reactions