-
Notifications
You must be signed in to change notification settings - Fork 93
Open
Description
Airbnb guidelines for alignment of React auto-closing tags (https://github.com/airbnb/javascript/tree/master/react#alignment) breaks indentation, as in the following example
export default <cx>
<MyComponent
that={1}
has={2}
closing={3}
tag={4}
in={5}
new={6}
line={7}
/>
<OtherComponent
should={1}
be={2}
indented={3}
/>
</cx>
while this one works fine:
/* Ok indentation */
export default <cx>
<MyComponent
that={1}
has={2}
closing={3}
tag={4}
in={5}
same={6}
line={7} />
<OtherComponent
indents={1}
ok={2} />
</cx>
This seems to happen only in cases when there is an empty line between the auto-closing tag sequence and the next tag, so this seems to work fine:
export default <cx>
<MyComponent
that={1}
has={2}
closing={3}
tag={4}
in={5}
new={6}
line={7}
/>
<OtherComponent
indents={1}
ok={2}
/>
</cx>
jeffvandyke, kbrah and JESii
Metadata
Metadata
Assignees
Labels
No labels