eslint-plugin-react-hooks
ESLint rules for React Hooks
Last updated 12 days ago by acdlite .
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 wait for a corresponding release of react-scripts that includes this rule 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

  • 1.7.0-alpha.0                                ...           alpha (6 months ago)
  • 0.0.0-4ab6305f6                                ...           canary (12 days ago)
  • 0.0.0-experimental-d364d8555                                ...           experimental (15 hours ago)
  • 2.1.2                                ...           latest (12 days ago)
  • 2.1.2                                ...           next (12 days ago)

54 Versions

  • 0.0.0-experimental-d364d8555                                ...           15 hours ago
  • 2.1.2                                ...           12 days ago
  • 0.0.0-4ab6305f6                                ...           12 days ago
  • 2.1.1                                ...           17 days ago
  • 0.0.0-d346d9208                                ...           17 days ago
  • 2.1.0                                ...           18 days ago
  • 0.0.0-3694a3b5e                                ...           18 days ago
  • 0.0.0-b4b8a349a                                ...           a month ago
  • 0.0.0-45b6443c9                                ...           a month ago
  • 2.0.1                                ...           2 months ago
  • 2.0.0 [deprecated]           ...           2 months ago
  • 0.0.0-8d5403877                                ...           2 months ago
  • 1.7.0                                ...           2 months ago
  • 1.7.0-rc.0                                ...           2 months ago
  • 0.0.0-a1dbb852c                                ...           2 months ago
  • 0.0.0-375616788                                ...           2 months ago
  • 0.0.0-db3ae32b8                                ...           3 months ago
  • 0.0.0-bbd21066e                                ...           3 months ago
  • 0.0.0-b4178af81                                ...           3 months ago
  • 0.0.0-424099da6                                ...           3 months ago
  • 0.0.0-9f395904c                                ...           3 months ago
  • 1.6.1                                ...           4 months ago
  • 0.0.0-fa1e8df11                                ...           4 months ago
  • 0.0.0-50b50c26f                                ...           5 months ago
  • 0.0.0-6da04b5d8                                ...           5 months ago
  • 0.0.0-fb28e9048                                ...           6 months ago
  • 0.0.0-4221565e1                                ...           6 months ago
  • 0.0.0-9ebe1768a                                ...           6 months ago
  • 0.0.0-a9eff329c                                ...           6 months ago
  • 1.7.0-alpha.0                                ...           6 months ago
  • 0.0.0-c35e37aab                                ...           6 months ago
  • 1.6.0                                ...           7 months ago
  • 0.0.0-679402a66                                ...           7 months ago
  • 1.5.1                                ...           7 months ago
  • 1.5.0                                ...           7 months ago
  • 1.5.0-beta.1                                ...           7 months ago
  • 1.5.0-beta.0                                ...           7 months ago
  • 1.5.0-alpha.0                                ...           7 months ago
  • 1.4.0                                ...           7 months ago
  • 1.3.0                                ...           8 months ago
  • 1.2.0                                ...           8 months ago
  • 1.1.0                                ...           8 months ago
  • 0.0.0-29b7b775f                                ...           8 months ago
  • 0.0.0-b668168d4                                ...           8 months ago
  • 1.1.0-rc.0                                ...           8 months ago
  • 1.1.0-alpha.1                                ...           8 months ago
  • 1.1.0-alpha.0                                ...           8 months ago
  • 1.0.2                                ...           8 months ago
  • 0.0.0-dfabb77a9                                ...           8 months ago
  • 0.0.0-0e4135e8c                                ...           8 months ago
  • 1.0.1                                ...           8 months ago
  • 0.0.0-11565a207                                ...           8 months ago
  • 1.0.0                                ...           8 months ago
  • 0.0.0                                ...           a year ago
Downloads
Today 4,042
This Week 8,499
This Month 37,445
Last Day 4,457
Last Week 23,596
Last Month 96,808
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (1495)

Copyright 2014 - 2016 © taobao.org |