This package has been deprecated

Author message:

Use @arabasta/eslint-plugin-require-useeffect-dependency-array module instead

eslint-plugin-require-useeffect-dependency-array

1.0.7 • Public • Published

DEPRECATED

DEPRECATED: Use the @arabasta/eslint-plugin-require-useeffect-dependency-array package instead. See

eslint-plugin-require-useeffect-dependency-array

npm Github License

This ESLint plugin enforces that React useEffect has a dependency array.

Installation

Assuming you already have ESLint installed, run:

# npm
npm install eslint-plugin-require-useeffect-dependency-array --save-dev

# yarn
yarn add eslint-plugin-require-useeffect-dependency-array --dev

Then extend the recommended eslint config:

{
  "extends": [
    // ...
    "plugin:require-useeffect-dependency-array/recommended"
  ]
}

Rules

✅ Set in the recommended configuration
🔧 Automatically fixable by the --fix CLI option

Rule Description 🔧
require-useeffect-dependency-array Enforce that useEffect has a dependency array 🔧

require-useeffect-dependency-array

Examples of incorrect code for this rule:

useEffect(() => {})

Examples of correct code for this rule:

useEffect(() => {}, [])

License

MIT

Package Sidebar

Install

npm i eslint-plugin-require-useeffect-dependency-array

Weekly Downloads

9

Version

1.0.7

License

MIT

Unpacked Size

6.54 kB

Total Files

6

Last publish

Collaborators

  • stoyan.a.kolev