# eslint-plugin-react-redux

> Enforcing best practices for react-redux

Latest version **4.2.2** (published 2025-03-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install eslint-plugin-react-redux
pnpm add eslint-plugin-react-redux
yarn add eslint-plugin-react-redux
bun add eslint-plugin-react-redux
```

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.2.2 |
| Published | 2025-03-17 |
| First published | 2017-12-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=18.0.0 |
| Dependencies | 2 |
| Unpacked size | 94.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | diana.suvorova@gmail.com |
| Maintainers | dianasuvorova |
| Keywords | eslint, eslintplugin, eslint-plugin, react-redux |

## Links

- npm: https://www.npmjs.com/package/eslint-plugin-react-redux
- Repository: https://github.com/DianaSuvorova/eslint-plugin-react-redux
- Homepage: https://github.com/DianaSuvorova/eslint-plugin-react-redux#readme
- Issues: https://github.com/DianaSuvorova/eslint-plugin-react-redux/issues
- npm.io page: https://npm.io/package/eslint-plugin-react-redux

## Dependencies (2)

- [eslint-plugin-react](https://npm.io/package/eslint-plugin-react.md) ^7.35.0
- [eslint-rule-composer](https://npm.io/package/eslint-rule-composer.md) ^0.3.0

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 4.2.2 (latest) — 2025-03-17
- 4.2.1 — 2025-03-16
- 4.2.0 — 2024-08-31
- 4.1.0 — 2023-11-02
- 4.0.0 — 2022-02-08
- 3.3.4 — 2021-12-26
- 3.3.2 — 2021-01-07
- 3.3.1 — 2020-12-14
- 3.3.0 — 2020-09-04
- 3.2.0 — 2020-08-28
- 3.1.0 — 2020-07-13
- 3.0.3 — 2020-01-02
- 3.0.2 — 2019-11-02
- 3.0.1 — 2019-02-01
- 3.0.0 — 2018-12-19
- … 18 more at https://npm.io/package/eslint-plugin-react-redux/versions

## README

# eslint-plugin-react-redux

Enforcing best practices for react-redux

## Installation

You'll first need to install [ESLint](http://eslint.org):

```
$ npm i eslint --save-dev
```

Next, install `eslint-plugin-react-redux`:

```
$ npm install eslint-plugin-react-redux --save-dev
```

**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-react-redux` globally.

## Usage

Add `react-redux` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:

```json
{
    "plugins": [
        "react-redux"
    ],
    "extends": [
        "plugin:react-redux/recommended"
    ]
}
```


To configure individual rules:

```json
{
    "rules": {
        "react-redux/connect-prefer-named-arguments": 2
    }
}
```

## Supported Rules

* [react-redux/connect-prefer-minimum-two-arguments](docs/rules/connect-prefer-minimum-two-arguments.md) Enforces that connect function has at least 2 arguments.
* [react-redux/connect-prefer-named-arguments](docs/rules/connect-prefer-named-arguments.md) Enforces that all connect arguments have recommended names.
* [react-redux/mapDispatchToProps-returns-object](docs/rules/mapDispatchToProps-returns-object.md) Enforces that mapDispatchToProps returns an object.
* [react-redux/mapDispatchToProps-prefer-shorthand](docs/rules/mapDispatchToProps-prefer-shorthand.md)  Enforces that all mapDispatchToProps use a shorthand method to wrap actions in dispatch calls whenever possible.
* [react-redux/mapDispatchToProps-prefer-parameters-names](docs/rules/mapDispatchToProps-prefer-parameters-names.md)  Enforces that all mapDispatchToProps parameters have specific names.
* [react-redux/mapStateToProps-no-store](docs/rules/mapStateToProps-no-store.md) Prohibits binding a whole store object to a component.
* [react-redux/mapStateToProps-prefer-hoisted](docs/rules/mapStateToProps-prefer-hoisted.md) Flags generation of copies of same-by-value but different-by-reference props.
* [react-redux/mapStateToProps-prefer-parameters-names](docs/rules/mapStateToProps-prefer-parameters-names.md) Enforces that all mapStateToProps parameters have specific names.
* [react-redux/mapStateToProps-prefer-selectors](docs/rules/mapStateToProps-prefer-selectors.md) Enforces that all mapStateToProps properties use selector functions. 
* [react-redux/useSelector-prefer-selectors](docs/rules/useSelector-prefer-selectors.md) Enforces that all useSelector properties use selector functions.
* [react-redux/no-unused-prop-types](docs/rules/no-unused-prop-types.md) Extension of a react's no-unused-prop-types rule filtering out false positive used in redux context.
* [react-redux/prefer-separate-component-file](docs/rules/prefer-separate-component-file.md) Enforces that all connected components are defined in a separate file.

---
_Source: https://npm.io/package/eslint-plugin-react-redux · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
