You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP

eslint-plugin-react-hooks-extra

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-react-hooks-extra

ESLint React's ESLint plugin for React Hooks related rules.

1.52.3-next.1
Version published
Weekly downloads
481K
-0.31%
Maintainers
1
Weekly downloads
 
Created

eslint-plugin-react-hooks-extra

Extra rules for React Hooks.

Install

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

Setup

// eslint.config.js

// @ts-check
import js from "@eslint/js";
import reactHooksExtra from "eslint-plugin-react-hooks-extra";
import tseslint from "typescript-eslint";

export default tseslint.config({
  files: ["**/*.ts", "**/*.tsx"],
  extends: [
    js.configs.recommended,
    tseslint.configs.recommended,
    reactHooksExtra.configs.recommended,
  ],
  languageOptions: {
    parser: tseslint.parser,
    parserOptions: {
      projectService: true,
      tsconfigRootDir: import.meta.dirname,
    },
  },
  rules: {
    // Put rules you want to override here
    "react-hooks-extra/no-unnecessary-use-prefix": "warn",
    "react-hooks-extra/prefer-use-state-lazy-initialization": "warn",
  },
});

Rules

https://eslint-react.xyz/docs/rules/overview#hooks-extra-rules

FAQs

Package last updated on 14 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts