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
Issue just to keep track of my progress on the rule implementation, discussed here.
Implement the equivalent ESLint rule yoda to forbid the use of yoda expressions.
Options
We wont implement the part of the original rules that enforces the use of yoda expressions (always) as it seems that is rarely used.
The onlyEquality option is also used rarely so we will skip it for now.
The exceptRange option is more adopted so it's worth supporting it.
The snippets below are from the ESLint rule tests.
Description
Issue just to keep track of my progress on the rule implementation, discussed here.
Implement the equivalent ESLint rule yoda to forbid the use of yoda expressions.
Options
We wont implement the part of the original rules that enforces the use of yoda expressions (
always
) as it seems that is rarely used.The
onlyEquality
option is also used rarely so we will skip it for now.The
exceptRange
option is more adopted so it's worth supporting it.The snippets below are from the ESLint rule tests.
Valid
Valid - Range expressions
Invalid
The text was updated successfully, but these errors were encountered: