This package has been deprecated

Author message:

WARNING: This project has been renamed to eslint-plugin-hooks. Install using eslint-plugin-hooks instead.

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

0.1.1 • Public • Published

eslint-plugin-hooks-sort

Build GitHub stars GitHub forks GitHub issues GitHub license NPM

A simple organizer for ordering hooks.

Built with ❤︎ by Hiukky


Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-hooks-sort:

$ npm install eslint-plugin-hooks-sort --save-dev

Usage

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"
        ]
      }
    ]
  }
}

Package Sidebar

Install

npm i eslint-plugin-hooks-sort

Weekly Downloads

165

Version

0.1.1

License

MIT

Unpacked Size

12.9 kB

Total Files

15

Last publish

Collaborators

  • hiukky