From 8b0bbccb86afe6a45383cb18635733f5ba1c190b Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Mon, 29 Sep 2025 11:50:36 -0400 Subject: [PATCH] [eprh] Temporarily disable compiler rules Temporarily disables the compiler rules in eslint-plugin-react-hooks. Will revert this later. --- packages/eslint-plugin-react-hooks/src/index.ts | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/packages/eslint-plugin-react-hooks/src/index.ts b/packages/eslint-plugin-react-hooks/src/index.ts index 65cb030d006d5..2235e8d5a6845 100644 --- a/packages/eslint-plugin-react-hooks/src/index.ts +++ b/packages/eslint-plugin-react-hooks/src/index.ts @@ -7,35 +7,18 @@ import type {Linter, Rule} from 'eslint'; import ExhaustiveDeps from './rules/ExhaustiveDeps'; -import { - allRules, - mapErrorSeverityToESlint, - recommendedRules, -} from './shared/ReactCompiler'; import RulesOfHooks from './rules/RulesOfHooks'; // All rules const rules = { 'exhaustive-deps': ExhaustiveDeps, 'rules-of-hooks': RulesOfHooks, - ...Object.fromEntries( - Object.entries(allRules).map(([name, config]) => [name, config.rule]) - ), } satisfies Record; // Config rules const ruleConfigs = { 'react-hooks/rules-of-hooks': 'error', 'react-hooks/exhaustive-deps': 'warn', - // Compiler rules - ...Object.fromEntries( - Object.entries(recommendedRules).map(([name, ruleConfig]) => { - return [ - 'react-hooks/' + name, - mapErrorSeverityToESlint(ruleConfig.severity), - ]; - }), - ), } satisfies Linter.RulesRecord; const plugin = {