eslint-plugin-react-hooks-order
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

eslint-plugin-react-hooks-order

It is a fork from https://github.com/hiukky/eslint-plugin-hooks


Installation

$ npm i eslint eslint-plugin-react-hooks-order --save-dev

Usage

Add hooks to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "plugins": ["react-hooks-order"]
}

Then configure the rules you want to use under the rules section.

{
  "rules": {
    "hooks/sort": [
      2,
      {
        "groups": [
          "useReducer",
          "useContext",
          "useState",
          "useRef",
          "useDispatch",
          "useCallback",
          "useEffect"
        ]
      }
    ]
  }
}

/eslint-plugin-react-hooks-order/

    Package Sidebar

    Install

    npm i eslint-plugin-react-hooks-order

    Weekly Downloads

    5

    Version

    0.1.2

    License

    Apache-2.0

    Unpacked Size

    17 kB

    Total Files

    13

    Last publish

    Collaborators

    • asergienko