Skip to content

📝 overrides configuration doesn't override all specified formatter options #6638

@marko-hologram

Description

@marko-hologram

Environment information

CLI:
  Version:                      2.0.6
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           windows

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  BIOME_THREADS:                unset
  NO_COLOR:                     unset
  TERM:                         unset
  JS_RUNTIME_VERSION:           v20.18.0
  JS_RUNTIME_NAME:              node
  NODE_PACKAGE_MANAGER:         npm/10.9.0

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

Formatter:
  Format with errors:           unset
  Indent style:                 unset
  Indent width:                 unset
  Line ending:                  unset
  Line width:                   unset
  Attribute position:           unset
  Bracket spacing:              unset
  Includes:                     **/*.ts, **/*.json

JavaScript Formatter:
  Enabled:                      true
  JSX quote style:              unset
  Quote properties:             unset
  Trailing commas:              unset
  Semicolons:                   unset
  Arrow parentheses:            unset
  Bracket spacing:              unset
  Bracket same line:            unset
  Quote style:                  Double Quotes
  Indent style:                 Tab
  Indent width:                 2
  Line ending:                  unset
  Line width:                   300
  Attribute position:           unset

JSON Formatter:
  Enabled:                      true
  Indent style:                 Tab
  Indent width:                 4
  Line ending:                  unset
  Line width:                   160
  Trailing Commas:              unset
  Expand lists:                 Always

CSS Formatter:
  Enabled:                      unset
  Indent style:                 unset
  Indent width:                 unset
  Line ending:                  unset
  Line width:                   unset
  Quote style:                  unset

GraphQL Formatter:
  Enabled:                      unset
  Indent style:                 unset
  Indent width:                 unset
  Line ending:                  unset
  Line width:                   unset
  Bracket spacing:              unset
  Quote style:                  unset

Workspace:
  Open Documents:               0

Configuration

{
	"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
	"vcs": {
		"enabled": true,
		"clientKind": "git",
		"useIgnoreFile": true
	},
	"files": {
		"ignoreUnknown": true
	},
	"linter": {
		"enabled": true,
		"rules": {
			"recommended": true
		}
	},
	"formatter": {
		"includes": [
			"**/*.ts",
			"**/*.json"
		]
	},
	"json": {
		"formatter": {
			"enabled": true,
			"expand": "always",
			"lineWidth": 160,
			"indentWidth": 4,
			"indentStyle": "tab"
		}
	},
	"javascript": {
		"formatter": {
			"enabled": true,
			"quoteStyle": "double",
			"expand": "always",
			"lineWidth": 300,
			"indentWidth": 2,
			"indentStyle": "tab"
		}
	},
	"assist": {
		"enabled": true,
		"actions": {
			"source": {
				"organizeImports": "on"
			}
		}
	},
	"overrides": [
		{
			"includes": [
				"src/overrides/**/*.ts"
			],
			"javascript": {
				"formatter": {
					"enabled": true,
					"quoteStyle": "single",
					"expand": "never",
					"lineWidth": 300
				}
			}
		}
	]
}

Playground link

https://github.com/marko-hologram/biome-overrides-bug

I couldn't reproduce this in Playground because I didn't see a way to specify overrides config for Biome there. Attached a repo with instructions how to reproduce the issue.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    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