Open bluefangs opened 3 years ago
I see beautify-web/js-beautify#1779 and beautify-web/js-beautify#1794 both have been merged, and released in js-beautify 1.11.0
Does it mean this extension need to upgrade its dependency and do a release?
Has the problem been solved?
I see that this is closed but 'm still dealing with this issue. When I run the beautify command on a file all of my optional chaining expressesions add a space before and after the ? question mark causing syntax errors
I am also having this problem using Beautify 1.5.0 in VSCode... How can I fix this other than disabling Beautify?
I am also having this problem using Beautify 1.5.0 in VSCode... How can I fix this other than disabling Beautify?
what i had to do was navigate to the folder where the extension is and run npm update
Google what directory vs code is in and then look for a subdirectory of extensions/hookyqr.beautify
The fix to this is just HookyQR updating the beautify-js dependency to a newer version that fixed this issue .... it takes less then 30 seconds
I appreciate the suggestion, but it's too much trouble. I just bailed on Beautify and switched to Prettier. Seems like maybe Beautify doesn't have it's stuff together. Idk.
I'm still heaving this issue. I run the npm update
as suggested but id didn't solve the issue.
Does anyone know how to stop Beautify to add space in JS Nullish Coalescing (?? -> ? ?) ?
@moscoso 's solution worked perfectly. I did have to reload vscode for it to work though.
@moscoso 's solution worked perfectly. I did have to reload vscode for it to work though.
Yep, just drop into ~/.vscode/extensions/hookyqr.beautify-1.5.0
, update package.json
and run npm update
-- I relaunched VScode to be sure and worked perfectly.
@jasonkneen Hey man, thank you, Great Solution!
VS Code settings:
Expected results
When there is chaining or nullish coalescing involved, do not put spaces inbetween '?'
Actual results
Space is added inbetween the '?' causing syntax error.
Similar issue : https://github.com/beautify-web/js-beautify/issues/1530
Thanks.