disallowSpacesInConditionalExpression

Disallows space before and/or after ? or : in conditional expressions.

Types: Object or Boolean

Values: "afterTest", "beforeConsequent", "afterConsequent", "beforeAlternate" as child properties, or true to set all properties to true. Child properties must be set to true. These token names correspond to:

var a = b ? c : d;
         ^ ^ ^ ^
         | | | |
         | | | └- beforeAlternate
         | | └--- afterConsequent
         | └-------- beforeConsequent
         └---------- afterTest

Example

"disallowSpacesInConditionalExpression": {
    "afterTest": true,
    "beforeConsequent": true,
    "afterConsequent": true,
    "beforeAlternate": true
}
Valid
var a = b?c:d;
var a= b?c:d;
Invalid
var a = b ?c:d;
var a = b? c:d;
var a = b?c :d;
var a = b?c: d;
Rule source
Test source