Skip to content

Enforce JSX newline+indentation #26

Open
@mattrabe

Description

@mattrabe

We should enforce how JSX attributes are placed on new lines and indented.

We should enforce that the new lines are in the right place. We're seeing PRs with eg:

<View style={{
  color: 'blue',
  width: 123,
}}
>

Attributes need to be on a new line and indented - style needs to be the start of the new line - like this:

<View
  style={{
    color: 'blue',
    width: 123,
  }}
>

I'm personally torn on whether we should always require new lines, vs start requiring new lines once there are 1,2,3 attributes...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions