-
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
Destructuring, importing, and short objects #853
Conversation
Destructuring, importing, and short objects
Awesome! All praise @bitwiseman! Thanks so much for doing this. It works wonderfully. |
Oh happy day! Can't wait to try this out! |
@bitwiseman Thanks for doing this! It helps a lot! One thing I'm still seeing is that this:
is becoming this:
This is using ES6 object destructuring in the function arguments where the desire would be for the object to stay on a single line, so I thought it might apply here. But let me know if this is a separate issue entirely. Thanks! |
@underscorebrody - No, I was expecting it to fix the input you provided. It looks like it comes out right locally. Did you turn on the new setting? |
Okay this was my fault, I ran the beautify task against some code that had been beautified already on the old version so it didn't get handled the right way. Sorry! |
@underscorebrody - No problem, thanks for jumping in and testing right away. Please report any other issues you find. 😄 |
Discovered #854 while testing as well, but i don't think it's directly related to this change |
@bitwiseman I've just read through #114, #315, #370 and #382, and really appreciate the work you've put into supporting this! However, with v1.6.2
Is that expected, or an issue with my setup? |
Probably a config issue: you need to set https://github.com/beautify-web/js-beautify/blob/master/test/data/javascript/tests.js#L1572 |
Thanks @bitwiseman Well done; //input
var test = {a: 1, b:2} it did't transform to //output
var test = {
a: 1,
b: 2
} but i expect output like above
|
Fixes #114
Fixes #315
Fixes #370
Fixes #382