Commit Graph

8 Commits (master)

Author SHA1 Message Date
Christopher Chedeau 924363193b Check if the next group has comments (#2040)
Fixes #1958
Fixes #1959
2017-06-07 15:20:11 -07:00
Christopher Chedeau 3264da9cab Fix leading comment (#1920)
It turns out that leading comment is attached to the CallExpression which is the last one and not the first one if they fit in a single line, so we want to not check that one.

Fixes #1892
2017-06-02 15:50:43 -07:00
Christopher Chedeau 8ad31635b6 Make the comment chain comment detection more robust (#1691)
I kept adding places where comments could be but more use cases kept creeping in. So now this is a holistical approach, we check all the comments that can be between two nodes. This way we should be good to go :)
2017-05-23 16:31:10 -07:00
Christopher Chedeau cf716e5538 Handle trailing comments in member chains (#1686) 2017-05-23 13:58:52 -07:00
Christopher Chedeau f69c5496c6 Break if the first group has an end of line comment (#1681)
This was unstable
2017-05-23 13:14:13 -07:00
Christopher Chedeau 4a4e1817be Do not merge member chain if there's a comment in-between (#1218)
Fixes #1198
2017-04-12 17:26:58 -07:00
Christopher Chedeau a9185cb30e Stabilize comment on member chain with three elements (#1039)
We already had a special case for it for a group of 2 elements but now that we are also going in this codepath for 3 if we merge, then we need to do the same here.

Fixes #930
2017-03-20 12:32:49 -04:00
Christopher Chedeau ec6ffbe063 Properly support member chains comments (#668)
When there is a comment right before the first `.`, we want to force break such that the comment is printed on its own line.

Note: this needs to be based on-top of #667 as it always indent the first `.`

Fixes #613
2017-02-13 09:05:18 -08:00