Closed abelnation closed 8 years ago
I did not try it yet but this is probably need to be handled similar to https://github.com/millermedeiros/esformatter/blob/master/lib/hooks/CallExpression.js#L50-L59
PS: NewExpression
is also handled by this file
WOW, this was harder than expected.. ended up introducing 2 new settings (CalleeOpeningParentheses
and CalleeClosingParentheses
) to handle these cases:
new ( foo );
new ( foo.bar );
new ( foo || bar )();
( foo || bar )();
there was some conflicts with the ExpressionOpeningParentheses
and ExpressionClosingParentheses
which was triggered automatically for cases like ( foo || bar )();
@abelnation thanks for the feature request/bug-report! please keep them coming!
I can't figure out how to preserve my paren spacing inside this call to
new
when the constructor is in parentheses. Note how the space afterwebkitAudioContext
is removed. The goal is to keep it.Note these two more condensed examples:
Here is my config: