Module

Whine.Core.CommaFirstArrays

Package
purescript-whine-core
Repository
collegevine/purescript-whine

Checks that array literals are written comma-first style, with elements aligned vertically, one space to the right of the commas.

Single-line arrays are ok.

Several elements on the same line are ok, as long as the first one of them is aligned correctly.

-- Good:
[ 1
, 2
, 3
]

-- Good:
[ 1, 2, 3 ]

-- Good:
[ 1, 2
, 3
, 4, 5
, 6
]

-- Bad:
[ 1
,  2
, 3
]

-- Bad:
[ 1
 , 2
, 3
]

-- Bad:
[
  1,
  2,
  3
]

-- Bad:
[ 1, 2,
 3, 4 ]

#rule Source

rule :: JSON -> Rule