pke/eslint-plugin-redux-saga

yield-effects - delegate yield* expression

2manyvcos opened this issue · 3 comments

Following code...
yield* takeLatest(LOGIN, funcLogin);

...displays a warning...
takeLatest effect must be yielded

which is confusing when trying to achieve blocking execution.

ESLint suggests to fix this with following
yield* yield takeLatest(LOGIN, funcLogin);
which doesn't look correct to me and is non blocking.

pke commented

This is clearly a bug!

pke commented

On which version of the plugin are you? Running this test in 0.3.0 produces no errors:

{
      code: buildTest(
        "import { takeLatest } from 'redux-saga'",
        "yield* takeLatest('LOGIN', function*(){})"
      )
    }

Could you post a more complete sample of code please?

I'm sorry, I had an outdated version of the plugin installed. Working fine under 0.3.0.