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
Forbid the usage of a property like the same way we have ForbiddenMethodCall.
Context
When you are using functions like combine, zip or similar ones Pair and Triple are really handy classes if then you continue using it with destructuring declarations. BUT if you access it data using first, second or third those classes are really bad because they give you 0 information about what you are accessing.
For that reason I think that forbid the usage of Pair.first, Pair.second, Triple.first... would be beneficial.
Expected Behavior of the rule
Forbid the usage of a property like the same way we have
ForbiddenMethodCall
.Context
When you are using functions like
combine
,zip
or similar onesPair
andTriple
are really handy classes if then you continue using it with destructuring declarations. BUT if you access it data usingfirst
,second
orthird
those classes are really bad because they give you 0 information about what you are accessing.For that reason I think that forbid the usage of
Pair.first
,Pair.second
,Triple.first
... would be beneficial.Example:
This is ok:
This is not ok
The reason of this proposal: #5058 (comment)
Related issue: #5015 we talked a bit about this topic there.
The text was updated successfully, but these errors were encountered: