JsFormat improperly formats BigInt literals
Closed this issue · 5 comments
sgerace commented
I'm currently using JsFormat v2019.01.20.01.35.14 with Sublime Text v3.2.2, Build 3211 and if I attempt to format a file containing BigInt literals, for example:
let x = 1n;
it splits the "1" from the "n" into:
let x = 1 n;
which is invalid syntax.
pavelvasev commented
Same for a?.b
syntax, jsFormat transforms it to a ? .b
which is incorrect.
bitwiseman commented
This is fixed in the upstream library. It just needs updating here.
pavelvasev commented
Thank you @bitwiseman!
sgerace commented
It's been almost a year since this was first reported and the upstream library was updated in May (see beautifier/js-beautify#1934). Any chance we can get an updated release? Thanks!
sgerace commented
I've created a pull request to incorporate the latest version of js-beautify, which I've confirmed addresses this issue.