eslint-plugin-react-hooks

This ESLint plugin enforces the Rules of Hooks.

Installation

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

Configuration

{
    "parserOptions": {
        "ecmaVersion": 6,
        "sourceType": "module",
        "ecmaFeatures": {
            "jsx": true
        }
    },
    "extends": [
        "plugin:react-hooks/recommended"
    ],
}