I have this line in my coffeescript file
if someVariable then no else yes
One of the most valuable feature in IDEA for me is code clean up. But it doesn't work as I expect here. After pressing Ctrl+Alt+L, IDEA reformats this line to ugly
if someVariable then {
no
} else yes
Which is not just bad style but error when compile from coffeescript to javascript.
Here is similar line which couldn't be formatted properly by IDEA.
return true if someVariable is 5
...becomes...
{
return true
} if someVariable is 5
Why is that?