eslint-plugin-react-hooks-extra
TypeScript icon, indicating that this package has built-in type declarations

1.34.1 • Public • Published

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,
    },
  },
  rules: {
    // Put rules you want to override here
    "react-hooks-extra/no-useless-custom-hooks": "warn",
  },
});

Rules

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

Package Sidebar

Install

npm i eslint-plugin-react-hooks-extra

Weekly Downloads

253,609

Version

1.34.1

License

MIT

Unpacked Size

63.8 kB

Total Files

7

Last publish

Collaborators

  • rel1cx