biomejs / biome

A toolchain for web projects, aimed to provide functionalities to maintain them. Biome offers formatter and linter, usable via CLI and LSP.
https://biomejs.dev
Apache License 2.0
14.95k stars 464 forks source link

📝 Formatting incompatibility between biome and prettier for class and implements #4143

Open guigaoliveira opened 2 weeks ago

guigaoliveira commented 2 weeks ago

Environment information

CLI:
  Version:                      1.9.2
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v22.8.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/10.8.3"

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

Formatter:
  Format with errors:           false
  Indent style:                 Space
  Indent width:                 2
  Line ending:                  Lf
  Line width:                   80
  Attribute position:           Auto
  Bracket spacing:              BracketSpacing(true)
  Ignore:                       [".eslintrc.js", "**/assets/**", "front/**"]
  Include:                      ["**/*.ts"]

JavaScript Formatter:
  Enabled:                      false
  JSX quote style:              Double
  Quote properties:             AsNeeded
  Trailing commas:              All
  Semicolons:                   Always
  Arrow parentheses:            Always
  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

{
  "$schema": "https://biomejs.dev/schemas/1.9.2/schema.json",
  "vcs": { "enabled": false, "clientKind": "git", "useIgnoreFile": false },
  "files": { "ignoreUnknown": false, "ignore": [] },
  "formatter": {
    "enabled": true,
    "useEditorconfig": true,
    "formatWithErrors": false,
    "indentStyle": "space",
    "indentWidth": 2,
    "lineEnding": "lf",
    "lineWidth": 80,
    "attributePosition": "auto",
    "bracketSpacing": true,
    "include": ["**/*.ts"],
    "ignore": [".eslintrc.js", "**/assets/**", "front/**"]
  },
  "organizeImports": {
    "enabled": false
  },
  "linter": {
    "enabled": true,
    "rules": {
      "recommended": true,
      "style": {
        "useImportType": "off",
        "noParameterAssign": "off",
        "noNonNullAssertion": "off"
      },
      "suspicious": {
        "noExplicitAny": "off",
        "noAsyncPromiseExecutor": "off"
      },
      "complexity": {
        "noUselessConstructor": "off",
        "noThisInStatic": "off",
        "noStaticOnlyClass": "off",
        "noBannedTypes": "off"
      },
      "performance": { "noDelete": "off" }
    },
    "include": ["**/*.ts"],
    "ignore": [".eslintrc.js", "**/assets/**", "front/**", "**/test/**"]
  },
  "javascript": {
    "formatter": {
      "jsxQuoteStyle": "double",
      "quoteProperties": "asNeeded",
      "trailingCommas": "all",
      "semicolons": "always",
      "arrowParentheses": "always",
      "bracketSameLine": false,
      "quoteStyle": "single",
      "attributePosition": "auto",
      "bracketSpacing": true
    },
    "parser": {
      "unsafeParameterDecoratorsEnabled": true
    }
  }
}

Playground link

https://biomejs.dev/playground/?indentStyle=space&code=ZQB4AHAAbwByAHQAIABjAGwAYQBzAHMAIABKAGkAcgBhAEMAcgBlAGEAdABlAFAAaQB4AEYAcgBhAHUAZABEAGUAdABlAGMAdABpAG8AbgBHAGEAdABlAHcAYQB5AAoAIAAgAGkAbQBwAGwAZQBtAGUAbgB0AHMACgAgACAAIAAgAFAAaQBjAGsAPABJAHMAcwB1AGUAUABpAHgARgByAGEAdQBkAEQAZQB0AGUAYwB0AGkAbwBuAEcAYQB0AGUAdwBhAHkALAAgACcAYwByAGUAYQB0AGUAUABpAHgARgByAGEAdQBkAEQAZQB0AGUAYwB0AGkAbwBuAEkAcwBzAHUAZQAnAD4ACgB7AAoAIAAgAGMAbwBuAHMAdAByAHUAYwB0AG8AcgAoAHAAcgBpAHYAYQB0AGUAIAByAGUAYQBkAG8AbgBsAHkAIABsAG8AZwBnAGUAcgA6ACAATABvAGcAZwBlAHIAKQAgAHsACgAgACAAIAAgAHQAaABpAHMALgBsAG8AZwBnAGUAcgAgAD0AIABsAG8AZwBnAGUAcgAuAGMAaABpAGwAZAAoAHsACgAgACAAIAAgACAAIABjAG8AbgB0AGUAeAB0ADoAIABKAGkAcgBhAEMAcgBlAGEAdABlAFAAaQB4AEYAcgBhAHUAZABEAGUAdABlAGMAdABpAG8AbgBHAGEAdABlAHcAYQB5AC4AbgBhAG0AZQAsAAoAIAAgACAAIAB9ACkAOwAKACAAIAB9AAoAfQA%3D

Code of Conduct

mdm317 commented 1 week ago

I'd like to work this.