A simple organizer for ordering hooks.
npm install eslint-plugin-hooks
Built with ❤︎ by hiukky
You'll first need to install ESLint:
```
$ npm i eslint --save-dev
Next, install eslint-plugin-hooks:
``
$ npm install eslint-plugin-hooks --save-dev
Add hooks to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
`json`
{
"plugins": ["hooks"]
}
Then configure the rules you want to use under the rules section.
`json``
{
"rules": {
"hooks/sort": [
2,
{
"groups": [
"useReducer",
"useContext",
"useState",
"useRef",
"useDispatch",
"useCallback",
"useEffect"
]
}
]
}
}