Thanks to visit codestin.com
Credit goes to github.com

Skip to content

HTML/Svelte/Astro/Vue formatting incorrectly lowercases component names that are variations of HTML element tag names #7864

@michaelshumshum

Description

@michaelshumshum

Environment information

CLI:
  Version:                      2.3.0
  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:           v24.6.0
  JS_RUNTIME_NAME:              node
  NODE_PACKAGE_MANAGER:         pnpm/10.19.0

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

Formatter:
  Format with errors:           unset
  Indent style:                 Space
  Indent width:                 2
  Line ending:                  unset
  Line width:                   unset
  Attribute position:           unset
  Bracket spacing:              unset
  Includes:                     **/*.*, !node_modules, !.svelte-kit

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

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

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

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",
  "linter": {
    "enabled": true
  },
  "formatter": {
    "enabled": true,
    "includes": ["**/*.*", "!node_modules", "!.svelte-kit"],
    "indentStyle": "space",
    "indentWidth": 2
  },
  "javascript": {
    "formatter": {
      "enabled": true,
      "quoteStyle": "double",
      "jsxQuoteStyle": "double"
    }
  },
  "css": {
    "formatter": {
      "enabled": true,
      "quoteStyle": "double"
    },
    "parser": {
      "cssModules": true
    }
  },
  "html": {
    "experimentalFullSupportEnabled": true,
    "formatter": {
      "enabled": true,
      "indentWidth": 2
    }
  },
  "overrides": [
    {
      "includes": ["**/*.svelte"],
      "linter": {
        "rules": {
          "style": {
            "useConst": "off",
            "useImportType": "off"
          },
          "correctness": {
            "noUnusedVariables": "off",
            "noUnusedImports": "off"
          }
        }
      }
    }
  ]
}

Playground link

https://biomejs.dev/playground/?files.main.svelte=PABzAGMAcgBpAHAAdAAgAGwAYQBuAGcAPQAiAHQAcwAiAD4ACgAgACAAaQBtAHAAbwByAHQAIAB7AEIAdQB0AHQAbwBuAH0AIABmAHIAbwBtACAAIgBiAHUAdAB0AG8AbgAuAHMAdgBlAGwAdABlACIACgA8AC8AcwBjAHIAaQBwAHQAPgAKAAoAPABCAHUAdAB0AG8AbgAgAGwAYQBiAGUAbAA9ACIAdABlAHMAdAAgAGIAdQB0AHQAbwBuACIALwA%2BAA%3D%3D&files.button.svelte=PABzAGMAcgBpAHAAdAAgAGwAYQBuAGcAPQAiAHQAcwAiAD4ACgAgACAAYwBvAG4AcwB0ACAAewAgAGwAYQBiAGUAbAAgAH0AOgAgAHsAbABhAGIAZQBsADoAIABzAHQAcgBpAG4AZwB9ACAAPQAgACQAcAByAG8AcABzACgAKQA7AAoAPAAvAHMAYwByAGkAcAB0AD4ACgAKADwAYgB1AHQAdABvAG4APgB7AGwAYQBiAGUAbAB9ADwALwBiAHUAdAB0AG8AbgA%2BAA%3D%3D

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Metadata

Metadata

Assignees

Labels

A-FormatterArea: formatterL-HTMLLanguage: HTML and super languagesS-Bug-confirmedStatus: report has been confirmed as a valid buggood first issueGood for newcomers

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions