JSPM

eslint-plugin-react-debug

1.5.31-next.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 254635
  • Score
    100M100P100Q182044F
  • License MIT

ESLint React's ESLint plugin for debugging related rules.

Package Exports

  • eslint-plugin-react-debug
  • eslint-plugin-react-debug/package.json

Readme

eslint-plugin-react-debug

Debugging rules.

[!TIP] 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-dom

Setup

Add the plugin to your eslint.config.js:

// @ts-check

import js from "@eslint/js";
import reactDebug from "eslint-plugin-react-debug";

export default [
  js.configs.recommended,
  {
    files: ["**/*.{ts,tsx}"],
    plugins: [
      "react-debug": reactDebug,
      rules: {
        "react-debug/class-component": "warn",
        "react-debug/function-component": "warn",
        "react-debug/react-hooks": "warn",
      }
    ],
  },
];

Rules

Rule Description 💼 💭
class-component Print all class components. 🐞
function-component Print all function components. 🐞
react-hooks Print all react hooks. 🐞