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
One issue that we keep finding in our codebase (a surprisingly large number of times): using combineLatest for only one observable. Usually, it's the result of refactoring code, that originally had multiple observables passed in, until it has only one left, but then forgetting to remove the combineLatest.
...and then we'll forget to remove the now unnecessary combineLatest call. If this plugin could somehow flag occurrences of the latter, it would be a huge help to us.
FYI, to help avoid edge cases, this would still be valuable to us even if it is was limited to only checking when combineLatest is declared with an array literal, like above, and should skip checking if an array variable is passed in, since that might not have a checkable length until runtime. e.g.:
One issue that we keep finding in our codebase (a surprisingly large number of times): using combineLatest for only one observable. Usually, it's the result of refactoring code, that originally had multiple observables passed in, until it has only one left, but then forgetting to remove the combineLatest.
For example, code like this:
...often gets refactored into something like this:
...and then we'll forget to remove the now unnecessary combineLatest call. If this plugin could somehow flag occurrences of the latter, it would be a huge help to us.
FYI, to help avoid edge cases, this would still be valuable to us even if it is was limited to only checking when combineLatest is declared with an array literal, like above, and should skip checking if an array variable is passed in, since that might not have a checkable length until runtime. e.g.:
The text was updated successfully, but these errors were encountered: