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
In the wild (e.g.), I have seen this pattern multiple times: there are nested if() statements, when a single conditional with the right conditional expression would do.
In the wild (e.g.), I have seen this pattern multiple times: there are nested
if()
statements, when a single conditional with the right conditional expression would do.For example, this
can be rewritten as:
Created on 2022-11-25 with reprex v2.0.2
The benefit is, of course, reduction in complexity and improved readability.
Currently, this doesn't produce a lint:
Created on 2022-11-25 with reprex v2.0.2
P.S. Needless to say, this is relevant only if there isn't some additional code in the outer scope. E.g.
The text was updated successfully, but these errors were encountered: