# eslint-plugin-react-hooks-order

> React hooks sort order

Latest version **0.1.2** (published 2022-06-09) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install eslint-plugin-react-hooks-order
pnpm add eslint-plugin-react-hooks-order
yarn add eslint-plugin-react-hooks-order
bun add eslint-plugin-react-hooks-order
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2022-06-09 |
| First published | 2022-06-09 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 1 |
| Unpacked size | 16.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Alexey Sergineko |
| Maintainers | asergienko |
| Keywords | eslint, eslintplugin, eslint-plugin, hooks, react, react-hooks, sort-hooks |

## Links

- npm: https://www.npmjs.com/package/eslint-plugin-react-hooks-order
- Repository: https://github.com/SergAlexAnd/eslint-plugin-react-hooks-order
- Homepage: https://github.com/SergAlexAnd/eslint-plugin-react-hooks-order#readme
- Issues: https://github.com/SergAlexAnd/eslint-plugin-react-hooks-order/issues
- npm.io page: https://npm.io/package/eslint-plugin-react-hooks-order

## Dependencies (1)

- [requireindex](https://npm.io/package/requireindex.md) ~1.2.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2022-06-09
- 0.1.1 — 2022-06-09
- 0.1.0 — 2022-06-09

## README

<h1 align="center"> eslint-plugin-react-hooks-order </h1>

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

<!-- <p align="center">
  <a href="https://travis-ci.org/github/hiukky/eslint-plugin-hooks">
    <img alt="Build" src="https://img.shields.io/github/workflow/status/hiukky/eslint-plugin-hooks/build?color=0d1117&style=for-the-badge&colorA=1C1D27">
  </a>
  <a href="https://github.com/hiukky/eslint-plugin-hooks/stargazers">
    <img alt="GitHub stars" src="https://img.shields.io/github/stars/hiukky/eslint-plugin-hooks?color=0d1117&style=for-the-badge&colorA=1C1D27">
  </a>
  <a href="https://github.com/hiukky/eslint-plugin-hooks/network">
    <img alt="GitHub forks" src="https://img.shields.io/github/forks/hiukky/eslint-plugin-hooks?color=0d1117&style=for-the-badge&colorA=1C1D27">
  </a>
  <a href="https://github.com/hiukky/eslint-plugin-hooks/issues">
    <img alt="GitHub issues" src="https://img.shields.io/github/issues/hiukky/eslint-plugin-hooks?style=for-the-badge&color=0d1117&colorA=1C1D27">
  </a>
  <a href="httdivs://github.com/hiukky/eslint-plugin-hooks/blob/develop/LICENSE">
    <img alt="GitHub license" src="https://img.shields.io/github/license/hiukky/eslint-plugin-hooks?color=0d1117&style=for-the-badge&colorA=1C1D27" />
  </a>
  <a href="https://www.npmjs.com/package/eslint-plugin-hooks">
    <img alt="NPM" src="https://img.shields.io/npm/dt/eslint-plugin-hooks?color=0d1117&style=for-the-badge&colorA=1C1D27" />
  </a>
</p> -->

<!-- <h3 align="center"> A simple organizer for ordering hooks. </h3> -->

<!-- <p align="center">
  <sub>Built with ❤︎ by <a href="https://hiukky.com">hiukky</a>
  <br/>
</p> -->

<br>

## Installation

<!-- You'll first need to install [ESLint](http://eslint.org): -->

```
$ 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:

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

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

---
_Source: https://npm.io/package/eslint-plugin-react-hooks-order · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
