requireSpaceAfterComma

Requires space after comma

Types: Boolean, or Object

Values:

  • Boolean: true to require a space after any comma
  • Object:
    • "allExcept" array of exceptions:
      • "trailing" ignore trailing commas

Example

"requireSpaceAfterComma": true
"requireSpaceAfterComma": {"allExcept": ["trailing"]}
Valid for mode true
var a, b;
Invalid for mode true
var a,b;
Valid for mode {"allExcept": ["trailing"]}
var a = [1, 2,];
Invalid for mode {"allExcept": ["trailing"]}
var a = [a,b,];
Rule source
Test source