eslint-plugin-react-debug
Debugging rules.
These rules are useful for static analysis, code transformation, or when building custom tooling that needs to identify specific React patterns.
Install
npm install --save-dev eslint-plugin-react-debug
Setup
import js from "@eslint/js";
import reactDebug from "eslint-plugin-react-debug";
import tseslint from "typescript-eslint";
export default tseslint.config({
files: ["**/*.ts", "**/*.tsx"],
extends: [
js.configs.recommended,
tseslint.configs.recommended,
reactDebug.configs.all,
],
languageOptions: {
parser: tseslint.parser,
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
"react-debug/function-component": "warn",
},
});
Rules
https://eslint-react.xyz/docs/rules/overview#debug-rules
v1.51.0 (2025-06-03)
✨ New
- feat(react-x): add
jsx-no-iife
rule, closes #1112 by @Rel1cx in https://github.com/Rel1cx/eslint-react/pull/1113
🐞 Fixes
- fix: fixed
no-direct-set-state-in-use-effect
deferred setState calls detection, closes #1117 by @Rel1cx in https://github.com/Rel1cx/eslint-react/pull/1119
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v1.50.0...v1.51.0