JSPM

eslint-plugin-react-debug

1.26.3-next.8
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 254635
  • Score
    100M100P100Q181715F
  • 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.

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

Setup

// @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/hook": "warn",
      "react-debug/is-from-react": "off",
    },
  },
];

Rules

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