Provides an eslint rule to check expectSaga from redux-test-plan is called within return statement only
npm install eslint-plugin-no-expectsaga-without-returneslint-plugin-no-expectSaga-without-return
===================
[![NPM version][npm-image]][npm-url]
Check that you don't forgot to insert return when calling expectSaga inside a test
Install ESLint either locally or globally. (Note that locally, per project, is strongly preferred)
``sh`
$ npm install eslint --save-dev
If you installed ESLint globally, you have to install plugin globally too. Otherwise, install it locally.
`sh`
$ npm install eslint-plugin-no-expectSaga-without-return --save-dev
Use our preset to get reasonable defaults:
`json`
"extends": [
"eslint:recommended",
"plugin:no-expectSaga-without-return/recommended"
]
If you do not use a preset you will need to specify individual rules and add extra configuration.
Add "no-expectSaga-without-return" to the plugins section.
`json`
{
"plugins": [
"no-expectSaga-without-return"
]
}
Enable the rules that you would like to use.
`json``
"rules": {
"no-expectSaga-without-return/mandatory-return": 2
}
* no-expectSaga-without-return/mandatory-return: Enforces return before expectSaga() calls
ESLint-plugin-React is licensed under the MIT License.
[npm-url]: https://www.npmjs.com/package/eslint-plugin-no-expectsaga-without-return
[npm-image]: https://img.shields.io/npm/v/eslint-plugin-react.svg