Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-react-hooks-extra

Package Overview
Dependencies
Maintainers
1
Versions
816
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.23.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
191K
decreased by-2.56%
Maintainers
1
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 07 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