Repository navigation
Description
Environment information
Details
CLI:
Version: 2.5.9
Color support: true
Platform:
CPU Architecture: x86_64
OS: linux
Environment:
BIOME_DISTRIBUTION: unset
BIOME_LOG_FILE: unset
BIOME_LOG_PATH: unset
BIOME_LOG_PREFIX_NAME: unset
BIOME_LOG_LEVEL: unset
BIOME_LOG_KIND: unset
BIOME_CONFIG_PATH: unset
BIOME_THREADS: unset
BIOME_WATCHER_KIND: unset
BIOME_WATCHER_POLLING_INTERVAL: unset
BIOME_BINARY: unset
RUST_BACKTRACE: unset
NO_COLOR: unset
TERM: xterm-256color
JS_RUNTIME_VERSION: unset
JS_RUNTIME_NAME: unset
NODE_PACKAGE_MANAGER: unset
Biome Configuration:
Status: Not set
Path: unset
Workspace:
Open Documents: 0
Note: this rage output is itself part of the bug evidence — it was captured in a directory containing a biome.json, yet reports Configuration: Not set because that config failed to parse (see below). The silent-ignore behavior also reproduces on 2.4.15 and 2.2.4, so this is not a recent regression; 2.5.10 was not run directly, but its changelog contains no configuration-loading changes.
What happened?
When biome.json fails to parse, the severity of the failure depends on
how biome is invoked — and in the common CI/task-runner shape (explicit
file or directory arguments below the config's directory), the broken
config is silently ignored and built-in defaults are applied, with no
diagnostic of any kind.
All rows verified on 2.5.9:
| Invocation | Behavior with unparseable biome.json |
|---|---|
biome check --config-path=biome.json … |
Config parse errors reported loudly ✅ |
biome check . (config dir in the scanned set) |
Parse diagnostic reported for biome.json as a file, then proceeds with defaults |
biome check <paths> (explicit paths / subdirectory) |
No diagnostic at all; defaults silently applied ❌ |
Reproduction (no playground link — config-file discovery cannot be
reproduced in the playground):
mkdir repro && cd repro
cat > biome.json <<'EOF'
{
// comment breaks strict json
"formatter": { "indentStyle": "space" }
}
EOF
cat > probe.ts <<'EOF'
const x = 1
export { x }
EOF
biome check probe.tsOutput — no mention of the broken configuration; both diagnostics betray
built-in defaults being applied (semicolons that no configuration asked
for, and default assist settings):
probe.ts:2:1 assist/source/organizeImports FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━
× This statement must be preceded by a blank line. Add a newline before this statement.
...
probe.ts format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
× Formatter would have printed the following content:
1 │ - const·x·=·1
2 │ - export·{·x·}
1 │ + const·x·=·1;
2 │ + export·{·x·};
Checked 1 file in 2ms. No fixes applied.
Found 2 errors.
A subdirectory argument behaves the same as the explicit file
(mkdir sub && cp probe.ts sub/ && biome check sub — silent). Only when
the config's own directory is in the scanned set (biome check .) or the
config is named explicitly (--config-path=biome.json) do the parse
errors surface.
Real-world impact: our monorepo's lint tasks run
biome check --write <projectRoot> per project — the explicit-path shape.
A config edit that was invalid in strict JSON (a // comment, legal only
in biome.jsonc) made every one of those tasks silently format with
built-in defaults (tabs, double quotes, semicolons) instead of the repo
style; one repo-wide run reformatted ~1700 files with no error anywhere.
The silent path also disables lint rules configured in the broken file —
in our case a security-motivated rule rollout — without any signal.
Expected result
A diagnostic that the discovered configuration failed to parse and that
defaults would be (or were) used — or the 1.x contract: "The configuration
file has errors. Biome will report only parsing errors until the
configuration is fixed" (biome#3518; the VS Code extension surfaced the
same message at least through 2.0.x, biome-vscode#681). Silently
substituting defaults is the worst option for --write callers.
Code of Conduct
- I agree to follow Biome's Code of Conduct
Activity
ematipico commentedon Aug 25, 2026
And yet I don't any mention of the
cicommand.Please provide a reproduction we can use.
biome-cookie commentedon Aug 25, 2026
Hello @petergil, please provide a minimal reproduction. You can use one of the following options:
npm create @biomejs/biome-reproductionIssues marked with
S-Needs reprowill be closed if they have no activity within 3 days.commit repro case for biomejs/biome#11504
petergil commentedon Aug 25, 2026
Apologies for the confusing wording — "CI/task-runner shape" referred to how CI systems typically invoke biome (explicit file/directory arguments, e.g. our tasks run
biome check --write <projectRoot>per monorepo project), not to thecicommand. The repro in the report usesbiome check.That said, I've now also tested
biome ciin the same repro on 2.5.9, and it behaves identically:biome ci probe.tsandbiome ci sub/→ no config diagnostic of any kind, built-in defaults appliedbiome ci .→ thebiome.jsonparse diagnostics are reportedSo the pattern holds across both commands: the config parse failure only surfaces when the config file itself lands in the scanned set (
.) or is named via--config-path; any explicit path below it gets silent defaults.Cloneable reproduction: https://github.com/petergil/biome-silent-config-repro — two files plus a Makefile, no dependencies.
make reproduce-bugruns the silent case, showsbiome ragereportingConfiguration: Not setdespite thebiome.jsonsitting right there, then thebiome check .contrast where the same config produces loud parse errors. (Override the binary withmake reproduce-bug BIOME='npx @biomejs/biome@2.5.9'.) The playground isn't applicable since the bug is in config-file discovery.petergil commentedon Aug 28, 2026
Ok, I've now had some time to look deeper into this and I believe that I have found the issue.
tl;dr: Certain classes of parse failure when loading a
biome.json/.jsoncconfiguration file get treated as "not found, try next alternative" instead of "invalid".biome check .appearing to work was a red herring, that invocation also silently skips the configuration file and uses defaults, but then reports the errors during normal operation.Verified against
main(4d9c1d5) by callingload_configuration/read_configdirectly against aMemoryFileSystem.read_config's auto-search predicate (biome_service/src/configuration.rs:307-314):Whenever
deserialized_content.deserializedisNone,is_foundisfalseandauto_search_files_with_predicatedoesn't consider it a valid config and the search continues upward. Which means thatdeserialized_contentis never assigned todeserialized, and the diagnostics are dropped. With nothing further up the tree,read_configreturnsOk(None), andload_configurationyieldsLoadedConfiguration::default(). This explains therageoutput (Configuration: Not set).This all happens before the CLI's diagnostic-printing step runs, so there's nothing for it to print.
deserialized_content.deserializedis_some()when the object-list parser can parse the file well enough that the root of the file is detected as aJsonObjectValue.For some malformed files the parser can partially recover (trailing comma in
biome.json/missing colon/wrong-typed field) anddeserializedcomes backSome(config)with anERRORdiagnostic attached, and these fail loudly, as expected.If it can't recover at all (comment at the root in
biome.json/stray token/unquoted key/empty file) it will fail to return a usable root node (most commonly aJsonArrayValue), sodeserializedcollapses straight toNone, which the predicate reads as "not a config, keep searching."One way to fix this bug would be to have the auto-search predicate keep the diagnostics even when
deserializedisNoneoris_root()is false, so a file that looks like a config candidate (right name, inthe search path) but fails to parse surfaces its
Errordiagnostics instead of being silently treated as "not a config, keep searching."petergil commentedon Aug 29, 2026
Sorry, I noticed that I missed attaching the test case file. You can download this to
crates/biome_service/tests/and remove the.txt.Then you can run the tests with:
cargo test -p biome_service --test issue_11504_malformed_config_discoveryissue_11504_malformed_config_discovery.rs.txt
ematipico commentedon Aug 29, 2026
@petergil add these files to the reproduction, we usually don't download files like this (security reason)
AlbinoGeek commentedon Sep 22, 2026
Another inline reproduction, 2.5.14, Linux. Two files in an empty directory:
biome.json{ "$schema": "https://biomejs.dev/schemas/2.5.14/schema.json", // tabs are banned here "formatter": { "indentStyle": "space" }, "linter": { "rules": { "recommended": false, "suspicious": { "noDebugger": "error" } } } }a.jsbiome format a.jswants to re-indent with tabs (the default), ignoringindentStyle: "space", andbiome lint a.jsdoesn't report thedebuggerthe config asks for.biome rageshows the configuration as not set. Replacing the comment with a trailing comma is reported as a parse error, so only comments take this silent path. It behaves the same with/* */.Real-world impact: in one of our repositories a single comment in
biome.jsonmade Biome lint 606 files with defaults instead of the 1,795 its config selects, surfacing 45,462 errors that weren't real. Nothing indicated the config had been dropped, so it looked like a regression in the code rather than in the config.Tool Use Disclaimer: Claude Code using Anthropic Opus 5.5 helped build the reproduction.
ematipico commentedon Sep 23, 2026
I'm surprised we don't have tests for these cases. I can reproduce the issue
Update dependency @biomejs/biome to v2.5.15 (#51)
Update dependency @biomejs/biome to v2.5.15 (#25)
Update dependency @biomejs/biome to v2.5.15 (#1775)