eslint-plugin-react-hooks
ESLint rules for React Hooks
Last updated a day ago by threepointone .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install eslint-plugin-react-hooks 
SYNC missed versions from official npm registry.

eslint-plugin-react-hooks

This ESLint plugin enforces the Rules of Hooks.

It is a part of the Hooks API for React.

Installation

Note: If you're using Create React App, please use react-scripts >= 3 instead of adding it directly.

Assuming you already have ESLint installed, run:

# npm
npm install eslint-plugin-react-hooks --save-dev

# yarn
yarn add eslint-plugin-react-hooks --dev

Then add it to your ESLint configuration:

{
  "plugins": [
    // ...
    "react-hooks"
  ],
  "rules": {
    // ...
    "react-hooks/rules-of-hooks": "error",
    "react-hooks/exhaustive-deps": "warn"
  }
}

Valid and Invalid Examples

Please refer to the Rules of Hooks documentation and the Hooks FAQ to learn more about this rule.

For feedback about the exhaustive-deps rule, please post in this thread.

License

MIT

Current Tags

  • 0.0.0-57333ca33                                ...           canary (a month ago)
  • 0.0.0-experimental-d28bd2994                                ...           experimental (2 days ago)
  • 2.5.0                                ...           latest (a day ago)
  • 0.0.0-d28bd2994                                ...           next (2 days ago)

89 Versions

  • 2.5.0                                ...           a day ago
  • 0.0.0-experimental-d28bd2994                                ...           2 days ago
  • 0.0.0-d28bd2994                                ...           2 days ago
  • 0.0.0-experimental-8d7535e54                                ...           2 days ago
  • 0.0.0-8d7535e54                                ...           2 days ago
  • 0.0.0-5de5b6150                                ...           7 days ago
  • 0.0.0-experimental-5de5b6150                                ...           7 days ago
  • 0.0.0-ea6ed3dbb                                ...           8 days ago
  • 0.0.0-experimental-ea6ed3dbb                                ...           8 days ago
  • 2.4.0                                ...           10 days ago
  • 2.4.0-alpha.0                                ...           10 days ago
  • 0.0.0-experimental-241c4467e                                ...           a month ago
  • 0.0.0-241c4467e                                ...           a month ago
  • 0.0.0-experimental-57333ca33                                ...           a month ago
  • 0.0.0-57333ca33                                ...           a month ago
  • 0.0.0-experimental-f42431abe                                ...           2 months ago
  • 0.0.0-f42431abe                                ...           2 months ago
  • 0.0.0-experimental-2c169a568                                ...           3 months ago
  • 0.0.0-experimental-3f3fe0874                                ...           3 months ago
  • 0.0.0-experimental-0e6839614                                ...           3 months ago
  • 2.3.0                                ...           3 months ago
  • 0.0.0-experimental-b53ea6ca0                                ...           4 months ago
  • 0.0.0-b53ea6ca0                                ...           4 months ago
  • 0.0.0-38dd17ab9                                ...           4 months ago
  • 0.0.0-experimental-38dd17ab9                                ...           4 months ago
  • 0.0.0-f6b8d31a7                                ...           4 months ago
  • 0.0.0-experimental-f6b8d31a7                                ...           4 months ago
  • 2.2.0                                ...           4 months ago
  • 0.0.0-experimental-5faf377df                                ...           4 months ago
  • 0.0.0-5faf377df                                ...           4 months ago
  • 0.0.0-experimental-1022ee0ec                                ...           4 months ago
  • 0.0.0-1022ee0ec                                ...           4 months ago
  • 0.0.0-experimental-7082d5a2d                                ...           4 months ago
  • 0.0.0-7082d5a2d                                ...           4 months ago
  • 0.0.0-experimental-d7feeb25a                                ...           4 months ago
  • 0.0.0-experimental-d364d8555                                ...           4 months ago
  • 2.1.2                                ...           5 months ago
  • 0.0.0-4ab6305f6                                ...           5 months ago
  • 2.1.1                                ...           5 months ago
  • 0.0.0-d346d9208                                ...           5 months ago
  • 2.1.0                                ...           5 months ago
  • 0.0.0-3694a3b5e                                ...           5 months ago
  • 0.0.0-b4b8a349a                                ...           5 months ago
  • 0.0.0-45b6443c9                                ...           5 months ago
  • 2.0.1                                ...           6 months ago
  • 2.0.0 [deprecated]           ...           6 months ago
  • 0.0.0-8d5403877                                ...           7 months ago
  • 1.7.0                                ...           7 months ago
  • 1.7.0-rc.0                                ...           7 months ago
  • 0.0.0-a1dbb852c                                ...           7 months ago
  • 0.0.0-375616788                                ...           7 months ago
  • 0.0.0-db3ae32b8                                ...           7 months ago
  • 0.0.0-bbd21066e                                ...           7 months ago
  • 0.0.0-b4178af81                                ...           7 months ago
  • 0.0.0-424099da6                                ...           7 months ago
  • 0.0.0-9f395904c                                ...           7 months ago
  • 1.6.1                                ...           8 months ago
  • 0.0.0-fa1e8df11                                ...           9 months ago
  • 0.0.0-50b50c26f                                ...           9 months ago
  • 0.0.0-6da04b5d8                                ...           10 months ago
  • 0.0.0-fb28e9048                                ...           10 months ago
  • 0.0.0-4221565e1                                ...           10 months ago
  • 0.0.0-9ebe1768a                                ...           10 months ago
  • 0.0.0-a9eff329c                                ...           a year ago
  • 1.7.0-alpha.0                                ...           a year ago
  • 0.0.0-c35e37aab                                ...           a year ago
  • 1.6.0                                ...           a year ago
  • 0.0.0-679402a66                                ...           a year ago
  • 1.5.1                                ...           a year ago
  • 1.5.0                                ...           a year ago
  • 1.5.0-beta.1                                ...           a year ago
  • 1.5.0-beta.0                                ...           a year ago
  • 1.5.0-alpha.0                                ...           a year ago
  • 1.4.0                                ...           a year ago
  • 1.3.0                                ...           a year ago
  • 1.2.0                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 0.0.0-29b7b775f                                ...           a year ago
  • 0.0.0-b668168d4                                ...           a year ago
  • 1.1.0-rc.0                                ...           a year ago
  • 1.1.0-alpha.1                                ...           a year ago
  • 1.1.0-alpha.0                                ...           a year ago
  • 1.0.2                                ...           a year ago
  • 0.0.0-dfabb77a9                                ...           a year ago
  • 0.0.0-0e4135e8c                                ...           a year ago
  • 1.0.1                                ...           a year ago
  • 0.0.0-11565a207                                ...           a year ago
  • 1.0.0                                ...           a year ago
  • 0.0.0                                ...           a year ago
Downloads
Today 1,023
This Week 25,275
This Month 113,259
Last Day 6,567
Last Week 33,209
Last Month 87,348
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (2331)

Copyright 2014 - 2017 © taobao.org |