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
TypeError: Cannot read property 'name' of undefined
Occurred while linting /Users/noah/test-saga.js:9
at checkYieldInObject (/Users/noah/node_modules/eslint-plugin-redux-saga/lib/rules/no-yield-in-race.js:11:29)
at CallExpression (/Users/noah/node_modules/eslint-plugin-redux-saga/lib/rules/no-yield-in-race.js:81:13)
at /Users/noah/node_modules/eslint/lib/linter/safe-emitter.js:45:58
This happens in the "no yield in race" rule. In checkYieldInObject, it assumes each property has a "key". The ExperimentalSpreadProperty node does not have a key.
If it's not reasonable to lookup the referenced object, a warning should be reported that object spread is not supported.
The text was updated successfully, but these errors were encountered:
Thanks for reporting. I'll see when I have time to fix it.
I think it depends where the spread object is defined. The rule would have to lookup the definition, which static code analyse can not do (so easily). Because the object could be defined in another module and imported into the linted file.
@pke can you suggest any workaround? Adding // eslint-disable-next-line redux-saga/no-yield-in-race has no effect - and then the only other possibility is to disable it for the whole file.
Given
Running eslint with the above results in:
This happens in the "no yield in race" rule. In
checkYieldInObject
, it assumes each property has a "key". TheExperimentalSpreadProperty
node does not have a key.If it's not reasonable to lookup the referenced object, a warning should be reported that object spread is not supported.
The text was updated successfully, but these errors were encountered: