ESLint rules for redux-saga.
Install the plugin:
npm i -D eslint-plugin-redux-saga
yarn add -D eslint-plugin-redux-saga
And add it to your .eslintrc
file:
{
"plugins": [
"redux-saga"
]
}
Rule | Description | Recommended | Fixable |
---|---|---|---|
yield-effects | Ensure effects are yielded | ||
no-yield-in-race | Prevent usage of yield in race entries | ||
no-unhandled-errors | Ensures error handling on sagas |
This plugin exports the recommended
configuration that enforces all the rules. To use it, add following property to .eslintrc
file:
{
"extends": [
"plugin:redux-saga/recommended"
]
}