Detects ternary operators. Useful for developers who find ternary operators hard to read and want forbid them. AvoidTernaryOperator was renamed from AvoidInlineConditionals in 2.6.0.

Configuration

{
    "type": "AvoidTernaryOperator",
    "props": {
        "severity": "ERROR"
    }
}

Invalid

var keycode = (event.keyCode != null) ? event.keyCode : event.which;