eslint-plugin-react-strict-hooks
v0.0.2
Published
Plugin for enforcing stricter rules on react hooks
Maintainers
Readme
eslint-plugin-react-strict-hooks
Plugin for enforcing stricter rules on react hooks
Installation
You'll first need to install ESLint:
npm i eslint --save-devNext, install eslint-plugin-react-strict-hooks:
npm install eslint-plugin-react-strict-hooks --save-devUsage
Add react-strict-hooks to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": [
"react-strict-hooks"
]
}Make sure that type checking in eslint is enabled
{
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname
}
}Then configure the rules you want to use under the rules section.
{
"rules": {
"react-strict-hooks/rule-name": 2
}
}Rules
| Name | | :------------------------------------------------------- | | no-useeffect-misuse |
