# eslint-plugin-hooks

> A simple organizer for ordering hooks.

Latest version **0.4.3** (published 2022-04-05) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; no vulnerabilities; high quality score.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.3 |
| Published | 2022-04-05 |
| First published | 2021-04-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 1 |
| Unpacked size | 13.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 25 |
| Author | Romullo @hiukky |
| Maintainers | hiukky |
| Keywords | eslint, eslintplugin, eslint-plugin, hooks, react, react-hooks, sort-hooks |

## Links

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

## 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.4.3 (latest) — 2022-04-05
- 0.4.2 — 2022-02-12
- 0.4.1 — 2021-10-12
- 0.4.0 — 2021-10-11
- 0.3.0 — 2021-10-09
- 0.2.0 — 2021-04-02
- 0.1.1 — 2021-04-02

## README

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

<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 --save-dev
```

Next, install `eslint-plugin-hooks`:

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

## Usage

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

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