Weird formatting behavior on delete line.
glorieux opened this issue · comments
Hi,
I've got a weird behavior when using the plugin in autosave mode.
Here is the result after the first time I press save:
if (seasonKeys.length > 1 && formattedSeasons["-1"]) {
formattedSeasons["1"] = (formattedSeasons["1"] || []).concat(formattedSeasons["-1"]);
delete formattedSeasons["-1"];
}
Nothing unusual.
Here is the result after the second save:
if (seasonKeys.length > 1 && formattedSeasons["-1"]) {
formattedSeasons["1"] = (formattedSeasons["1"] || []).concat(formattedSeasons["-1"]);
delete formattedSeasons["-1"]
;
}
You can notice that the semicolon is placed on an extra line.
I've tried removing things from the config but nothing works. I've also tried running the document directly through jsfmt and it was behaving as expected.
I'm using the default configuration and a project .jsfmt containing a single indent option set to 4 spaces.
Do you have any idea what might cause that issue or how to fix it ?
It looks like it was a bug in esformatter rdio/jsfmt#165
I will update jsfmt and the issue should be fixed in a couple of hours.
Thanks for your reactivity!!