Skip to content

Unwanted space after the colon of a namespaced JSX attributeΒ #55293

Closed
@lyonbot

Description

@lyonbot

πŸ”Ž Search Terms

formatting jsx namespaced attribute extra space

πŸ•— Version & Regression Information

  • This changed between versions v5.0.x and v5.1.0

⏯ Playground Link

https://www.typescriptlang.org/zh/play?#code/MYewdgzgLgBAhjAvDAPAEwJYDcBc8EBmIIMeMARnAE6IBEUAptLTESDpQF50CsLA9AD4A3EA

πŸ’» Code

Paste this into a editor (like VSCode), then format it with default foramtter:

const a = <div: aa foo : bar="test" foo:baz="5" />;

πŸ™ Actual behavior

Outputs

const a = <div: aa foo: bar="test" foo: baz="5" />;

πŸ™‚ Expected behavior

Outputs

const a = <div:aa foo:bar="test" foo:baz="5" />;

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions