Skip to content

📝 Formatter breaks TSX syntax with comment on first line of generic #5091

Open
@macarie

Description

@macarie

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.12.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "pnpm/9.15.5"

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:                 Tab
  Indent width:                 2
  Line ending:                  Lf
  Line width:                   80
  Attribute position:           Auto
  Bracket spacing:              BracketSpacing(true)
  Ignore:                       []
  Include:                      []

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

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

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
	},
}

Playground link

https://biomejs.dev/playground/?code=dAB5AHAAZQAgAEcAZQBuAGUAcgBpAGMAPABUAD4AIAA9ACAAVAAKAAoAZABlAGMAbABhAHIAZQAgAGMAbwBuAHMAdAAgAE4AYQBtAGUAcwBwAGEAYwBlADoAIAB7AAoACQBDAG8AbQBwAG8AbgBlAG4AdAA6ACAARwBlAG4AZQByAGkAYwA8AAoACQAJAC8ALwAgAGEAIABjAG8AbQBtAGUAbgB0AAoACQAJAHsACgAJAAkACQBjAGgAaQBsAGQAcgBlAG4AOgAgAHUAbgBrAG4AbwB3AG4AOwAKAAkACQB9AAoACQA%2BADsACgB9AAoA

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-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