mapsapi-codestyle icon indicating copy to clipboard operation
mapsapi-codestyle copied to clipboard

Clarifying object notation

Open twirl opened this issue 10 years ago • 2 comments

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?

twirl avatar Nov 23 '16 13:11 twirl

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.

dmikis avatar Nov 23 '16 14:11 dmikis

For me this rule is very strict. I agree with @dmikis

ikokostya avatar Nov 23 '16 14:11 ikokostya