Skip to content

New rule: require-multiline-attribute-newline #362

Open
@OJFord

Description

@OJFord

Motivation

More readable multiline attribute blocks.

Description

When an attribute gets long, particularly spanning multiple lines, IMO it's not very readable to have them (start) on the same line as the prop or directive.

Examples

<!-- ✓ GOOD -->
<Foo
  on:click={
    () => {
      foo = bar
    }
  }
/>

<!-- ✗ BAD -->
<Foo
  on:click={() => {
    foo = bar
  }}
/>

Additional comments

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions