Skip to content

Prettier-style formatting for opening tags #13036

Description

@kevinbourassahoule

As a follow-up to the new "Attribute indent style" formatting option from #12700 for #6551 and #8413, it would be nice to have the following (or equivalent) settings:

  • Put first attribute on new line when opening tag spans more than one line
  • Put closing bracket on new line when opening tag spans more than one line

So that this would be untouched:

<MyComponent Param1="hello" Param2="world">
    <ChildComponent />
</MyComponent>

But this:

<MyComponent Param1="hello"
             Param2="world">
    <ChildComponent />
</MyComponent>

Would be formatted to this (assuming the attribute indent style is set to indent by one level):

<MyComponent
    Param1="hello"
    Param2="world"
>
    <ChildComponent />
</MyComponent>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions