Registry / testing / eslint-plugin-redux-saga

eslint-plugin-redux-saga

JSON →
library1.3.2jsnpmunverified

An ESLint plugin providing linting rules for redux-saga to catch common mistakes and enforce best practices. Version 1.3.2 is the current stable release, published in 2022 with a low maintenance cadence (last commit in 2020). Key differentiators: it includes three recommended rules for ensuring effects are yielded (yield-effects), preventing yield inside race entries (no-yield-in-race), and catching unhandled errors in sagas (no-unhandled-errors). Compared to alternatives like eslint-plugin-redux-saga (by the redux-saga org), this plugin is community-maintained and focuses on a smaller set of opinionated rules.

npm install eslint-plugin-redux-saga
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-REDU
E
eslint-plugin-redux-saga
testingjavascriptv1.3.2
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

plugin
✓ { "plugins": ["redux-saga"] }
✗ { "plugins": ["eslint-plugin-redux-saga"] }
When adding to ESLint config, use the short name 'redux-saga' (without the 'eslint-plugin-' prefix). The plugin is automatically resolved by ESLint.
recommended config
✓ { "extends": ["plugin:redux-saga/recommended"] }
✗ { "extends": ["redux-saga/recommended"] }
Always prefix with 'plugin:' when extending presets from plugins. Without 'plugin:', ESLint will try to find a shareable config named 'redux-saga'.
Individual rules
✓ { "rules": { "redux-saga/yield-effects": "error", "redux-saga/no-yield-in-race": "warn", "redux-saga/no-unhandled-errors": "error" } }
✗ { "rules": { "eslint-plugin-redux-saga/yield-effects": "error" } }
Rule names are prefixed with the short plugin name 'redux-saga/', not the full package name.
require() in Node scripts
✓ const plugin = require('eslint-plugin-redux-saga');
✗ const plugin = require('redux-saga');
When importing programmatically in Node, use the full package name. The short name is only for ESLint config files.

Installs the plugin and ESLint, then configures ESLint to use the plugin with recommended rules and a custom warning for no-yield-in-race.

npm install --save-dev eslint-plugin-redux-saga eslint # or yarn add --dev eslint-plugin-redux-saga eslint # .eslintrc.json { "plugins": ["redux-saga"], "extends": ["plugin:redux-saga/recommended"], "rules": { "redux-saga/no-yield-in-race": "warn" } }
Debug
Known issues
gotchaThe plugin requires redux-saga as a peer dependency. If redux-saga is not installed, rules may behave unexpectedly or crash.
fix
Install redux-saga: npm install redux-saga
affects: >=1.0.0
gotchaRule 'no-unhandled-errors' can produce false positives if error handling is done in a parent saga or via try-catch wrapping.
fix
Disable or adjust rule severity, or restructure saga error handling to be explicit.
affects: >=1.0.0
deprecatedThe plugin is in maintenance mode with no new updates since 2020. Future ESLint versions may introduce incompatibilities.
fix
Consider migrating to the official redux-saga ESLint plugin or forks with active maintenance.
affects: >=1.3.2
gotchaESLint 7+ requires the plugin to be compatible with flat config. This plugin does not support flat config (eslint.config.js).
fix
Use legacy .eslintrc format or use an alternative plugin that supports flat config.
affects: >=1.3.2
Errors
Common errors & fixes
ESLint: Failed to load plugin 'redux-saga': Cannot find module 'eslint-plugin-redux-saga'
The plugin is not installed or not resolvable.
fix
Run 'npm install eslint-plugin-redux-saga --save-dev' and ensure it's in node_modules.
Configuration for rule 'redux-saga/no-yield-in-race' is invalid: Severity should be one of the following: 0 = off, 1 = warn, 2 = error
Invalid severity value in eslintrc.
fix
Use numbers (0,1,2) or strings ('off','warn','error'). Example: "redux-saga/no-yield-in-race": 2
ESLint: Unexpected top-level property 'extends[0]' value 'plugin:redux-saga/recommended' is not valid.
Missing 'plugin:' prefix or incorrect string.
fix
Use "plugin:redux-saga/recommended" with the 'plugin:' prefix.
ReferenceError: saga is not defined (when using 'yield-effects' rule)
Saga generator functions not properly declared or used outside a function.
fix
Ensure effects are used inside a generator function and that the rule is not mistakenly applied to non-saga code.
Upgrade
Version history
1.3.2latest on npm
Audit
Dependencies
eslintrequiredPeer dependency: required for the plugin to work as an ESLint plugin.
redux-sagaoptionalPeer dependency: rules are designed for redux-saga patterns (version >=0.11.1 <1 or >=1.0.0).
Agent activity
4 hits · last 30 days
node
4
Resources
eslint-plugin-redux-saga — npm install eslint-plugin-redux-saga · libregistry