You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I might disagree with with whitespace categorically being "not code" and everything else being "code".
The presence and type of whitespace can alter the behavior of program as much as a semicolon. (e.g. placing a newline in return 1 is highly significant, just as placing a semicolon.)
But I'll concede that this would be non-trivially different than what js-beautify does now :(
JS's funny semicolon insertion can cause non-obvious bugs.
returns
undefined
.For this reason, it's considered best practice to explicitly end statements with a semicolon.
It would be nice if js-beautify did this.
In this case, it would format it as
(FYI, uglifyjs -b does exactly this.)
The text was updated successfully, but these errors were encountered: