Closed futurist closed 8 years ago
need to do something similar to: https://github.com/millermedeiros/esformatter/blob/master/lib/hooks/IfStatement.js#L33-L40 for the _br.limitBefore(elseKeyword, 'ElseStatement');
inside else if (alt.type === 'BlockStatement')
I won't have time to work on it this week, PRs are highly appreciated.
see: https://github.com/millermedeiros/esformatter/commit/a3599b7c092bbd636bfed154d95d7e6b49064e87 and #426
tested below
if
statement:after formatted, the result: