jsformat-atom
jsformat-atom copied to clipboard
Object 'shorthand' incorrectly applying space
Formatting files that use object 'shorthand' notation will result in weird object spacing.
For instance,
var foo = 0;
var object = {
foo,
bar: 1,
baz: 2
};
will format to
var foo = 0;
var object = {
foo,
bar: 1,
baz: 2
};
where the 'baz' property (and all further properties) will have one additional level of indent. Commenting out the 'foo' property or not using shorthand will produce expected results, so
var foo = 0;
var object = {
foo: foo,
bar: 1,
baz: 2
};
If this is ES6, I'm not sure if it's supported. JS-Beautify is our formatting engine, so it needs to be supported by that for it to work.