Requires the variable to be the right hand operator when doing a boolean comparison
Types: Array
or Boolean
Values:
true
specifies that yoda conditions are required for most possible comparison operatorsArray
: represents the list of quoted operators that requires yoda conditions"requireYodaConditions": true
"requireYodaConditions": [
"==",
"===",
"!=",
"!=="
]
true
or ['==']
if (1 == a) {
return
}
true
or ['==']
if (a == 1) {
return
}