eslint-react-props-in-state-plugin
v1.0.0
Published
It reports several things:
Downloads
4
Readme
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 oncomponentWillReceiveProps
- When you do not use
nextProps
inside ofcomponentWillReceiveProps
- When you implicit use of
this.props
while mutatingthis.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"
]
}