New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-react-hooks-extra

Package Overview
Dependencies
Maintainers
0
Versions
845
Alerts
File Explorer

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.26.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
195K
increased by3.5%
Maintainers
0
Weekly downloads
 
Created
Source

eslint-plugin-react-hooks-extra

Extra rules for React Hooks.

[!NOTE] This plugin is already included in @eslint-react/eslint-plugin. You don't need to install it separately if you are using @eslint-react/eslint-plugin.

Install

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

Setup

// @ts-check

import js from "@eslint/js";
import reactHooksExtra from "eslint-plugin-react-hooks-extra";

export default [
  js.configs.recommended,
  {
    files: ["**/*.{ts,tsx}"],
    plugins: {
      "react-hooks-extra": reactHooksExtra,
    },
    rules: {
      // react-hooks-extra recommended rules
      "react-hooks-extra/no-direct-set-state-in-use-effect": "warn",
      "react-hooks-extra/no-useless-custom-hooks": "warn",
      "react-hooks-extra/prefer-use-state-lazy-initialization": "warn",
    },
  },
];

Rules

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

Keywords

FAQs

Package last updated on 30 Jan 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc