eslint-plugin-react-use-declaration

Dont use React.useHook

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-react-use-declaration:

$ npm install eslint-plugin-react-use-declaration --save-dev

Usage

Add react-use-declaration to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "react-use-declaration"
    ]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "react-use-declaration/rule-name": 2
    }
}