UNPKG

eslint-plugin-react-debug

Version:

ESLint React's ESLint plugin for debugging related rules.

48 lines (37 loc) 958 B
# 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 ```sh # npm npm install --save-dev eslint-plugin-react-debug ``` ## Setup ```js // eslint.config.js // @ts-check 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: { // Put rules you want to override here "react-debug/function-component": "warn", }, }); ``` ## Rules <https://eslint-react.xyz/docs/rules/overview#debug-rules>