UNPKG

eslint-plugin-redux-saga

Version:
52 lines (34 loc) 1.76 kB
# eslint-plugin-redux-saga [![CI](https://github.com/pke/eslint-plugin-redux-saga/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/pke/eslint-plugin-redux-saga/actions/workflows/ci.yml) [![npm version](https://img.shields.io/npm/v/eslint-plugin-redux-saga.svg?style=flat-square)](https://badge.fury.io/js/eslint-plugin-redux-saga) [![License](https://img.shields.io/npm/l/eslint-plugin-redux-saga.svg?style=flat-square)](LICENSE) [ESLint](https://github.com/eslint/eslint) rules for [redux-saga](https://github.com/yelouafi/redux-saga). ## Usage Install the plugin: ### npm `npm i -D eslint-plugin-redux-saga` ### yarn `yarn add -D eslint-plugin-redux-saga` And add it to your `.eslintrc` file: ```json { "plugins": [ "redux-saga" ] } ``` ## Rules | Rule | Description | Recommended | Fixable | |-------------|------|-------------|---------| | [yield-effects](docs/rules/yield-effects.md) | Ensure effects are yielded | ![recommended](https://img.shields.io/badge/-recommended-lightgrey.svg) | ![suggestion fixable](https://img.shields.io/badge/-suggestion%20fixable-green.svg) | | [no-yield-in-race](docs/rules/no-yield-in-race.md) | Prevent usage of yield in race entries | ![recommended](https://img.shields.io/badge/-recommended-lightgrey.svg) | ![fixable](https://img.shields.io/badge/-fixable-green.svg) | [no-unhandled-errors](docs/rules/no-unhandled-errors.md) | Ensures error handling on sagas | ![recommended](https://img.shields.io/badge/-recommended-lightgrey.svg) | ## Recommended configuration This plugin exports the `recommended` configuration that enforces all the rules. To use it, add following property to `.eslintrc` file: ```json { "extends": [ "plugin:redux-saga/recommended" ] } ```