Lucas Duailibe
8249b1c841
Add support for JSXSpreadChild and fix comments inside JSXSpread ( #3163 )
...
* Add support for JSXSpreadChild and fix comments inside JSXSpread
* Dangling comments
* Use another approach
2017-11-07 14:23:10 +11:00
Lucas Duailibe
2c5a792d9a
fix(jsx): Break opening elements with single text attribute if there's a comment ( #3154 )
...
* fix(jsx): Break opening elements with single text attribute if there's a comment
* Single text attribute with a comment on the JSXElement name
* Consolidate rules of comments in JSX
2017-11-07 08:05:59 +11:00
Lucas Duailibe
bb145c19c1
Rephrase comment
2017-11-04 01:52:27 -02:00
Lucas Duailibe
1dfffd14e7
Don't inline trailing } for arrow functions in JSX
2017-11-04 01:52:27 -02:00
Lucas Duailibe
979b86944d
Consider [0] to be part of the first member group
2017-11-02 14:42:13 -02:00
Lucas Duailibe
538ce6d209
Preserve line breaks in css grid declaration
2017-11-02 00:21:41 -02:00
Lucas Duailibe
21c6d4f501
Prevent inlining JSXAttribute if it has comments ( #3132 )
2017-11-01 09:56:04 -06:00
Lucas Duailibe
38b15f7899
Improve template literal expresions line breaks ( #3124 )
2017-10-31 14:31:27 -06:00
Lucas Duailibe
6ccf5c0246
fix(jsx): Don't inline trailing } for arrow functions attributes ( #3110 )
2017-10-26 11:32:57 -06:00
Lucas Duailibe
878412c680
Break parens for binaries in member expression ( #2958 )
...
* Break parens for binaries in member expression
* Add test case
* Update snapshot
2017-10-22 17:29:13 -06:00
Lucas Duailibe
b53a426e15
Prevent breaking MemberExpression inside NewExpression ( #3075 )
...
* Test case
* Prevent breaking MemberExpression inside NewExpression
2017-10-22 10:30:05 +11:00
Lucas Duailibe
465729685f
Fix indentation of intersection object types ( #3074 )
2017-10-21 17:45:41 +11:00
Lucas Duailibe
158edf5388
typo: ident -> indent
2017-10-18 11:54:44 -02:00
Lucas Duailibe
4b4a15b842
doc(resolveConfig): document options.config ( #3050 )
2017-10-18 14:16:02 +11:00
Lucas Duailibe
f82fcbc98e
Prevent formatting GQL template literals with expressions ( #2975 )
...
* Prevent formatting GQL template literals with expressions
* Remove unnecessary check
* Change quasis check to expression check
2017-10-05 11:23:57 +11:00
Lucas Duailibe
2466ce11a5
Force template literals to break after ` for sytled-components ( #2926 )
...
Force template literals to break after ` for styled-components
2017-10-02 17:55:42 +02:00
Lucas Duailibe
038d02b3e2
Revert "Fix line break in test declarations with a single argument function declaration" ( #2912 )
...
This reverts commit 3703cb5b07 .
2017-09-27 21:32:34 +02:00
Lucas Duailibe
3703cb5b07
Fix line break in test declarations with a single argument function declaration ( #2877 )
2017-09-26 19:24:25 +02:00
Lucas Duailibe
9b0d6b8de0
Fix different precedence binary expression when inlining ( #2827 )
2017-09-20 17:07:51 +02:00
Lucas Duailibe
f51929e262
Lint fix
2017-09-10 15:00:52 -06:00
Lucas Duailibe
902f7f0339
Use same logic for binary chain
2017-09-10 15:00:52 -06:00
Lucas Duailibe
1b2127efb6
Update snapshot
2017-09-10 15:00:52 -06:00
Lucas Duailibe
bd78572b19
Break closing paren of ConditionalExpression in member chains
2017-09-10 15:00:52 -06:00
Lucas Duailibe
955a2c1472
Keep conditional expressions in one line on method chains ( #2784 )
...
Fixes #2775 .
This commit will make conditional expressions to match the behavior of
logical expression in method chains:
```js
(a ? b : c).map()
// if the conditional fits in oneline
(a ? b : c)
.map()
// if the conditional doesn't fit
(a
? b
: c)
.map()
```
2017-09-10 08:34:55 -07:00
Lucas Duailibe
bba7dcf498
Fix break on conditional expressions inside return
...
Fixes #2777
Since we can't break after `return` and don't add `()` around
ConditionalExpressions' tests, we end up with some weird indentation when
breaking.
2017-09-10 04:13:47 -06:00
Lucas Duailibe
85f1351366
Fix unused var
2017-09-07 21:57:07 -06:00
Lucas Duailibe
3cfee9c976
Clarification of code
2017-09-07 21:57:07 -06:00
Lucas Duailibe
2c37697f82
Fix chained logical expressions with objects/array/etc inlined
2017-09-07 21:57:07 -06:00
Lucas Duailibe
f964be5f8a
Remove unnecessary tests
2017-09-07 21:29:53 -06:00
Lucas Duailibe
541e929b43
Change how JSX mode is activated in ternaries
2017-09-07 21:29:53 -06:00
Lucas Duailibe
15989df6e1
Group last argument if it's an empty object with a comment ( #2758 )
2017-09-05 12:22:25 -07:00
Lucas Duailibe
8e9fb43841
Fix trailing comment on switch case ( #1136 )
...
* Fix trailing comment on switch case
* Use unshift and add another test case
2017-04-05 16:27:14 -07:00
Lucas Duailibe
69879e23bc
Print comment after key ( #1131 )
2017-04-05 13:10:10 -07:00