You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/rules/yoda.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,8 +43,8 @@ This rule can take a string option:
43
43
44
44
The default`"never"` option can have exception options in an object literal:
45
45
46
-
* If the`"exceptRange"` property is`true`, the rule*allows*yoda conditions in range comparisons which are wrapped directly in parentheses, including the parentheses of an`if` or`while` condition. The default value is`false`. A*range* comparison tests whether a variable is inside or outside the range between two literal values.
47
-
* If the`"onlyEquality"` property is`true`, the rule reportsyoda conditions*only* for the equality operators`==` and`===`. The default value is`false`.
46
+
* If the`"exceptRange"` property is`true`, the rule*allows*Yoda conditions in range comparisons which are wrapped directly in parentheses, including the parentheses of an`if` or`while` condition. The default value is`false`. A*range* comparison tests whether a variable is inside or outside the range between two literal values.
47
+
* If the`"onlyEquality"` property is`true`, the rule reportsYoda conditions*only* for the equality operators`==` and`===`. The default value is`false`.
48
48
49
49
The`onlyEquality` option allows a superset of the exceptions which`exceptRange` allows, thus both options are not useful together.