eslint-plugin-react-strict-hooks

0.0.2 • Public • Published

eslint-plugin-react-strict-hooks

Plugin for enforcing stricter rules on react hooks

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-react-strict-hooks:

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

Usage

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

{
    "plugins": [
        "react-strict-hooks"
    ]
}

Make sure that type checking in eslint is enabled

{
  parserOptions: {
    project: './tsconfig.json',
    tsconfigRootDir: __dirname
  }
}

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

{
    "rules": {
        "react-strict-hooks/rule-name": 2
    }
}

Rules

Name
no-useeffect-misuse

Dependencies (3)

Dev Dependencies (11)

Package Sidebar

Install

npm i eslint-plugin-react-strict-hooks

Weekly Downloads

1

Version

0.0.2

License

ISC

Unpacked Size

5.74 kB

Total Files

4

Last publish

Collaborators

  • ansile