1.0.0 • Published 8 years ago
eslint-react-props-in-state-plugin v1.0.0
eslint-plugin-react-props-in-state
It reports several things:
- When you do not have
componentWillReceivePropson components that depends on props - When you do not have
nextPropsargument oncomponentWillReceiveProps - When you do not use
nextPropsinside ofcomponentWillReceiveProps - When you implicit use of
this.propswhile mutatingthis.state
Installation
You'll first need to install ESLint:
$ npm i eslint --save-devNext, install eslint-plugin-change-listeners:
$ npm install eslint-plugin-react-props-in-state --save-devNote: 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"
]
}1.0.0
8 years ago