-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Space added to "from++" due to ES6 keyword #858
Comments
Could you provide an example with more context? I have tests for |
This is our .jsbeautifyrc, if that helps. We are using grunt-jsbeautifier
Our package.json:
npm install output:
example.js function resizeWindow( from, to ) {
while ( from !== to ) {
getWidthStub.returns( from );
$( window ).trigger( 'resize' );
if ( from < to ) {
from++;
} else {
from--;
}
}
} after running function resizeWindow( from, to ) {
while ( from !== to ) {
getWidthStub.returns( from );
$( window ).trigger( 'resize' );
if ( from < to ) {
from ++;
} else {
from --;
}
}
} Curiously, I do not see the same behavior if example.js contains var i = 0;
i++; |
After further testing, the following reduced example.js also exhibits the same issue: if ( from < to ) {
from++;
} else {
from--;
} |
After further digging, we have determined that this is happening likely because |
Yes, thank you for drilling in on this. Yes, |
After the 1.6.0 update, jsbeautifier wants to make the following change to my code. It wants to change
i++
toi ++
. Is there a way to prevent this?The text was updated successfully, but these errors were encountered: