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
Conditionals (in functions) that don't return a value or end the function are most likely causing a side-effect.
In the case when it is used to assign a value to a variable, in order to not have a complex ternary expression, should probably be moved to a separate function.
Switch cases should also return statement and should therefore not use break.
Top-level conditionals should be exempted from this rule, as they can't return values. (bikeshedding here?)
Conditionals (in functions) that don't return a value or end the function are most likely causing a side-effect.
In the case when it is used to assign a value to a variable, in order to not have a complex ternary expression, should probably be moved to a separate function.
Switch cases should also return statement and should therefore not use
break
.Top-level conditionals should be exempted from this rule, as they can't return values. (bikeshedding here?)
Invalid
Valid
The text was updated successfully, but these errors were encountered: