SEE a problem, ACT upon it. This plugin currently have one rule: catching the use of this.state
inside this.setState
.
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-seeact
:
$ npm install eslint-plugin-seeact --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install eslint-plugin-seeact
globally.
Add seeact
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"seeact"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"seeact/rule-name": 2
}
}
- seeact/no-access-state-in-setstate: Prevent using
this.state
insidethis.setState
ESLint-plugin-seeact is licensed under the MIT License.