disallowSpaceBeforeSemicolon

Disallows spaces before semicolons.

Types: Boolean or Object

Values:

  • true to disallow any spaces before any semicolon.
  • Object:
    • "allExcept": [ "(" ] list of tokens that can occur after semicolon

Example

"disallowSpaceBeforeSemicolon": true
Valid
var a = 1;
  • Valid for mode { "allExcept": [ "(" ] }
for ( ; nodeIndex < nodesCount; ++nodeIndex ) {}
Invalid
var a = 1 ;
Rule source
Test source