Skip to content

🐛 extending a config from an npm package causes biome to fallback to default settings #6616

@adamhl8

Description

@adamhl8

Environment information

CLI:
  Version:                      2.0.6
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  BIOME_THREADS:                unset
  NO_COLOR:                     unset
  TERM:                         xterm-256color
  JS_RUNTIME_VERSION:           v22.6.0
  JS_RUNTIME_NAME:              node
  NODE_PACKAGE_MANAGER:         bun/1.2.17

Biome Configuration:
  Status:                       Loaded successfully
  Path:                         biome.jsonc
  Formatter enabled:            true
  Linter enabled:               true
  Assist enabled:               true
  VCS enabled:                  true

Workspace:
  Open Documents:               0

What happened?

Extending a config that's a part of an npm package causes biome to fall back to default settings and completely ignore settings set in the root config.

{
  "$schema": "https://biomejs.dev/schemas/latest/schema.json",
  "extends": ["@adamhl8/configs/biome"],
  "formatter": {
    "lineWidth": 120
  },
  "javascript": {
    "formatter": {
      "semicolons": "asNeeded"
    }
  }
}

Run the following:

echo "console.log('hi')" | bun biome check --stdin-file-path="test.js" --write --log-level=debug

Output:

2025-06-29T00:29:50.408281Z  INFO main crates/biome_cli/src/commands/mod.rs: Configuration file loaded: Some("/Users/adam/homelab/biome.json"), diagnostics detected 0
2025-06-29T00:29:50.408449Z DEBUG main insert_project: crates/biome_service/src/projects.rs: Insert workspace folder /Users/adam/homelab
2025-06-29T00:29:50.408500Z DEBUG main update_settings: crates/biome_service/src/projects.rs: Set nested settings for /Users/adam/homelab
2025-06-29T00:29:50.408755Z DEBUG main with_settings_and_language: crates/biome_service/src/workspace.rs: The file has the following feature sets: {Debug: Supported, Format: Supported, Assist: Supported, Lint: Supported, Search: Supported} path="test.js"
2025-06-29T00:29:50.409889Z DEBUG main format_file: crates/biome_service/src/file_handlers/javascript.rs: JsFormatOptions { indent_style: Tab, indent_width: 2, line_ending: Lf, line_width: 80, quote_style: Double, jsx_quote_style: Double, quote_properties: AsNeeded, trailing_commas: All, semicolons: Always, arrow_parentheses: Always, bracket_spacing: BracketSpacing(true), bracket_same_line: BracketSameLine(false), source_type: JsFileSource { language: JavaScript, variant: Standard, module_kind: Module, version: ES2022, embedding_kind: None }, attribute_position: Auto, expand: Auto } path=test.js
console.log("hi");

Note that line_width: 80 and trailing_commas: All despite what I have in my root config.

Also in the config I'm extending "lineWidth: 120" and "semicolons": "asNeeded", so it's not like the extended config is winning or something.

Removing the extends from my root config will make it work as expected. Also, extending a local config works as well.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Metadata

Metadata

Assignees

Labels

S-Needs triageStatus: this issue needs to be triaged

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions