Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
8.2, 10.0
-
None
-
None
Description
When I have nested objects with objects and arrays it should indent like from the rules which is working, if you always create a new line inside of an object or inside of an array.
But if you opening an array and adding the opening curly bracket right after your array bracket "[{" w/o adding new line, it will break the formatting, for the next new line.
Right:
var test = {
foo: [
{
bar: 2
}
]
};
Wrong:
var test2 = { foo: [{ bar: 3 }], bar: [{a: { bar: 3 }}] }; var test3 = { foo: {test: { tt: 3 }} };
Of course the argument is, ok do it like the first one, but no, I want an object inside of an array starting right after the opening array because it looks nicer.
Expected formatting:
var test = { foo: [{ bar: 3 }], bar: [{ a: { bar: 3 } }] }; var test3 = { foo: { test: { tt: 3 } } };