Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wrap Stateless JSX Arrow Functions in Parens (fixes part of #73)
- Loading branch information
1 parent
4872459
commit 1601500
Showing
3 changed files
with
88 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const render1 = ({ styles }) => ( | ||
<div style={styles} key="something"> | ||
Keep the wrapping params. Put each key on it's own line. | ||
</div> | ||
); | ||
|
||
const render2 = ({ styles }) => <div style={styles} key="something"> | ||
Create wrapping params. | ||
</div>; | ||
|
||
const render3 = ({ styles }) => <div style={styles} key="something">Bump to next line without parens</div>; | ||
|
||
const render4 = ({ styles }) => <div style={styles} key="something">Create wrapping parens and indent <strong>all the things</strong>.</div>; | ||
|
||
const render5 = ({ styles }) => <div>Keep it on one line.</div>; | ||
|
||
const notJSX = (aaaaaaaaaaaaaaaaa, bbbbbbbbbbb) => this.someLongCallWithParams(aaaaaa, bbbbbbb).anotherLongCallWithParams(cccccccccccc, dddddddddddddddddddddd) |