Skip to content

📝 Formatter needs two saves to settle #5035

Open
@dawsonbooth

Description

@dawsonbooth

Environment information

CLI:
  Version:                      1.9.4
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v22.13.1"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "yarn/4.6.0"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 false

Formatter:
  Format with errors:           false
  Indent style:                 Space
  Indent width:                 2
  Line ending:                  Lf
  Line width:                   100
  Attribute position:           Auto
  Bracket spacing:              BracketSpacing(true)
  Ignore:                       ["public/", "*.code-snippets", "routeTree.gen.ts"]
  Include:                      []

JavaScript Formatter:
  Enabled:                      false
  JSX quote style:              Double
  Quote properties:             AsNeeded
  Trailing commas:              All
  Semicolons:                   AsNeeded
  Arrow parentheses:            AsNeeded
  Bracket spacing:              BracketSpacing(true)
  Bracket same line:            false
  Quote style:                  Single
  Indent style:                 unset
  Indent width:                 unset
  Line ending:                  unset
  Line width:                   unset
  Attribute position:           Auto

JSON Formatter:
  Enabled:                      true
  Indent style:                 unset
  Indent width:                 unset
  Line ending:                  unset
  Line width:                   unset
  Trailing Commas:              unset

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

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

Workspace:
  Open Documents:               0

Configuration

{
"formatter": {
    "enabled": true,
    "useEditorconfig": true,
    "formatWithErrors": false,
    "indentStyle": "space",
    "indentWidth": 2,
    "lineEnding": "lf",
    "lineWidth": 100,
    "attributePosition": "auto",
    "bracketSpacing": true,
    "ignore": ["public/", "*.code-snippets", "routeTree.gen.ts"]
  },
"javascript": {
    "formatter": {
      "jsxQuoteStyle": "double",
      "quoteProperties": "asNeeded",
      "trailingCommas": "all",
      "semicolons": "asNeeded",
      "arrowParentheses": "asNeeded",
      "bracketSameLine": false,
      "quoteStyle": "single",
      "attributePosition": "auto",
      "bracketSpacing": true
    }
  }
}

Playground link

https://biomejs.dev/playground/?lineWidth=100&indentStyle=space&quoteStyle=single&semicolons=as-needed&arrowParentheses=as-needed&code=aQBtAHAAbwByAHQAIAB7ACAAegAgAH0AIABmAHIAbwBtACAAIgB6AG8AZAAiADsACgAKAGUAeABwAG8AcgB0ACAAYwBvAG4AcwB0ACAAZgBvAG8AIAA9ACAAegAKACAAIAAuAG8AYgBqAGUAYwB0ACgAewB9ACkACgAgACAALgBjAGEAdABjAGgAYQBsAGwAKAAKACAAIAAgACAAegAuAGEAcgByAGEAeQAoAHoALgBzAHQAcgBpAG4AZwAoACkAKQAuAHIAZQBmAGkAbgBlACgAKABpAHQAZQBtAHMAKQAgAD0APgAgAG4AZQB3ACAAUwBlAHQAKABpAHQAZQBtAHMAKQAuAHMAaQB6AGUAIAA9AD0APQAgAGkAdABlAG0AcwAuAGwAZQBuAGcAdABoACwAIAB7ACAAbQBlAHMAcwBhAGcAZQA6ACAAJwBBAHIAcgBhAHkAIABlAG4AdAByAGkAZQBzACAAbQB1AHMAdAAgAGIAZQAgAHUAbgBpAHEAdQBlACcAIAB9ACkALAAKACAAIAApAA%3D%3D

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-FormatterArea: formatterL-JavaScriptLanguage: JavaScript and super languagesS-Bug-confirmedStatus: report has been confirmed as a valid bug

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions