eslint-plugin-react-props-in-state

1.0.7 • Public • Published

eslint-plugin-react-props-in-state

It reports several things:

  • When you do not have componentWillReceiveProps on components that depends on props
  • When you do not have nextProps argument on componentWillReceiveProps
  • When you do not use nextProps inside of componentWillReceiveProps
  • When you implicit use of this.props while mutating this.state

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-change-listeners:

$ npm install eslint-plugin-react-props-in-state --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-react-props-in-state globally.

Usage

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

{
    "plugins": [
        "react-props-in-state"
    ]
}

Dependents (0)

Package Sidebar

Install

npm i eslint-plugin-react-props-in-state

Weekly Downloads

3

Version

1.0.7

License

ISC

Unpacked Size

14 kB

Total Files

3

Last publish

Collaborators

  • jankuca
  • petrbrzek
  • nikitamironov