Open
Description
Following up on #71
Currently, the yield-effects
rule complains about this code:
const requests = endpoints.map(endpoint => call(fetch, endpoint));
yield all(requests);
We can get around the rule by inlining the code inside the yield all()
call:
yield all(endpoints.map(endpoint => call(fetch, endpoint)));
It would be lovely, however, (especially for more complicated code) if this rule supported the first use case so that we could keep the semantic value of a variable that describes what we are yielding. Obviously there is no limit to how complicated this code could get and still be valid (for example, in the above code the requests could be defined in a different function) and keeping track of that in eslint itself would be impossible without a static type system, but I'm curious if it could support this one use case.