disallowSpaceAfterComma

Disallows spaces after commas

Types: Boolean or Object

Values:

  • Boolean: true to disallow any spaces after any comma
  • Object: "allExcept" array of exceptions
    • "sparseArrays" to allow spaces in place of absent values in sparse arrays

Example

"disallowSpaceAfterComma": true
"disallowSpaceAfterComma" {"allExcept": ["sparseArrays"]}
Valid for mode true
[a,b,c];
Invalid for mode true
[a, b, c];
[a,b, , ,c];
Valid for mode {"allExcept": ["sparseArrays"]}
[a,b, , ,c];
Invalid for mode {"allExcept": ["sparseArrays"]}

`js [a, b, , , c];

Rule source
Test source