maksimr/vim-jsbeautify

Doesn't format right on property getters and setters?

Closed this issue · 4 comments

Not sure if I'm the only one that's having this issue but when I do the following:-

var obj = {
    get getValue() {
        console.log("Get something");
    },
    set setValue(value) {
        console.log("Setting something");
    }
};

It gets formatted to the following:-

var obj = {
   get getValue() {
           console.log("Get something");
       },
       set setValue(value) {
           console.log("Setting something");
       }
};

Nothing special on the command, just did :call JsBeautify(). That's it.

@sinkingshriek what version of js-beautify your use?

According to it's package.json, it's 1.5.4.

@sinkingshriek work for me with js-beautify@1.5.4

Closing. Seems to work now. 😄 Sorry took this long time.