Repository navigation
Fix comma when an arrow function with no arguments breaks - #210
Conversation
|
|
||
| return concat([ | ||
| "(", | ||
| indent( |
There was a problem hiding this comment.
I also tried adding printed.length > 0 && next to options.trailingComma, which is the correct, fix but it doesn't look really good.
veryLongCall(VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_LONG_CONSTANT, (
) =>
{});There was a problem hiding this comment.
Yep, this is the easiest thing to do! The representation below can't completely collapse in this case because it wants to break across lines. But because we can statically analyze this and easily know we never want to break up the parens your solution is correct.
|
|
||
| return concat([ | ||
| "(", | ||
| indent( |
There was a problem hiding this comment.
Yep, this is the easiest thing to do! The representation below can't completely collapse in this case because it wants to break across lines. But because we can statically analyze this and easily know we never want to break up the parens your solution is correct.
Fixes #118