eslint-plugin-react-hooks
ESLint rules for React Hooks
Last updated 24 days ago by gaearon .
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 (4 months ago)
  • 0.0.0-b4178af81                                ...           canary (10 hours ago)
  • 1.6.1                                ...           latest (24 days ago)
  • 1.6.0                                ...           next (4 months ago)

36 Versions

  • 0.0.0-b4178af81                                ...           10 hours ago
  • 0.0.0-424099da6                                ...           4 days ago
  • 0.0.0-9f395904c                                ...           5 days ago
  • 1.6.1                                ...           24 days ago
  • 0.0.0-fa1e8df11                                ...           2 months ago
  • 0.0.0-50b50c26f                                ...           2 months ago
  • 0.0.0-6da04b5d8                                ...           2 months ago
  • 0.0.0-fb28e9048                                ...           3 months ago
  • 0.0.0-4221565e1                                ...           3 months ago
  • 0.0.0-9ebe1768a                                ...           3 months ago
  • 0.0.0-a9eff329c                                ...           3 months ago
  • 1.7.0-alpha.0                                ...           4 months ago
  • 0.0.0-c35e37aab                                ...           4 months ago
  • 1.6.0                                ...           4 months ago
  • 0.0.0-679402a66                                ...           4 months ago
  • 1.5.1                                ...           4 months ago
  • 1.5.0                                ...           4 months ago
  • 1.5.0-beta.1                                ...           4 months ago
  • 1.5.0-beta.0                                ...           4 months ago
  • 1.5.0-alpha.0                                ...           4 months ago
  • 1.4.0                                ...           5 months ago
  • 1.3.0                                ...           5 months ago
  • 1.2.0                                ...           5 months ago
  • 1.1.0                                ...           5 months ago
  • 0.0.0-29b7b775f                                ...           5 months ago
  • 0.0.0-b668168d4                                ...           5 months ago
  • 1.1.0-rc.0                                ...           5 months ago
  • 1.1.0-alpha.1                                ...           5 months ago
  • 1.1.0-alpha.0                                ...           5 months ago
  • 1.0.2                                ...           5 months ago
  • 0.0.0-dfabb77a9                                ...           5 months ago
  • 0.0.0-0e4135e8c                                ...           5 months ago
  • 1.0.1                                ...           5 months ago
  • 0.0.0-11565a207                                ...           5 months ago
  • 1.0.0                                ...           5 months ago
  • 0.0.0                                ...           9 months ago
Downloads
Today 1,140
This Week 14,234
This Month 50,243
Last Day 3,006
Last Week 19,188
Last Month 37,470
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (884)

Copyright 2014 - 2016 © taobao.org |