Skip to content

Ansile/eslint-plugin-react-strict-hooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published