mapsapi-codestyle
mapsapi-codestyle copied to clipboard
Clarifying object notation
Right now the codestyle neither approves nor forbides wrapping JS object into single line (like that: {prop1: value1, prop2: value2}, though all ‘Good’ examples contain no such code. Shouldn't we explicitly state whether or not object wrapping is appropriate?
Is there real need to do this? I'm usually using rule of thumb "if more than one prop make it multiline", but there're times when writing two or even three props in one line literal makes code more compact and streamline. YMMV, however.
For me this rule is very strict. I agree with @dmikis