requireSpacesInConditionalExpression

Requires 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.

Example

"requireSpacesInConditionalExpression": {
    "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