0.1.1 • Published 5 years ago
eslint-plugin-hooks-sort v0.1.1
Installation
You'll first need to install ESLint:
$ npm i eslint --save-devNext, install eslint-plugin-hooks-sort:
$ npm install eslint-plugin-hooks-sort --save-devUsage
Add hooks-sort to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": ["hooks-sort"]
}Then configure the rules you want to use under the rules section.
{
"rules": {
"hooks-sort/order": [
2,
{
"groups": [
"useSelector",
"useContext",
"useState",
"useDispatch",
"useCallback"
]
}
]
}
}