From 829e8918a6d6657a0cd0aedeb33e1ca45025ea20 Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Wed, 19 Mar 2025 16:17:25 -0400 Subject: [PATCH] [eprh] Remove __EXPERIMENTAL__ `__EXPERIMENTAL__` flag doesn't have any use outside of the React repo. Let's remove these flags for now. --- .../eslint-plugin-react-hooks/src/rules/ExhaustiveDeps.ts | 5 +---- .../eslint-plugin-react-hooks/src/rules/RulesOfHooks.ts | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/compiler/packages/eslint-plugin-react-hooks/src/rules/ExhaustiveDeps.ts b/compiler/packages/eslint-plugin-react-hooks/src/rules/ExhaustiveDeps.ts index 1b00597572..5d79b33970 100644 --- a/compiler/packages/eslint-plugin-react-hooks/src/rules/ExhaustiveDeps.ts +++ b/compiler/packages/eslint-plugin-react-hooks/src/rules/ExhaustiveDeps.ts @@ -2056,10 +2056,7 @@ function isAncestorNodeOf(a: Node, b: Node): boolean { } function isUseEffectEventIdentifier(node: Node): boolean { - if (__EXPERIMENTAL__) { - return node.type === 'Identifier' && node.name === 'useEffectEvent'; - } - return false; + return node.type === 'Identifier' && node.name === 'useEffectEvent'; } function getUnknownDependenciesMessage(reactiveHookName: string): string { diff --git a/compiler/packages/eslint-plugin-react-hooks/src/rules/RulesOfHooks.ts b/compiler/packages/eslint-plugin-react-hooks/src/rules/RulesOfHooks.ts index 0ab0c5ff21..e67df2dd40 100644 --- a/compiler/packages/eslint-plugin-react-hooks/src/rules/RulesOfHooks.ts +++ b/compiler/packages/eslint-plugin-react-hooks/src/rules/RulesOfHooks.ts @@ -109,10 +109,7 @@ function isInsideDoWhileLoop(node: Node | undefined): node is DoWhileStatement { } function isUseEffectEventIdentifier(node: Node): boolean { - if (__EXPERIMENTAL__) { - return node.type === 'Identifier' && node.name === 'useEffectEvent'; - } - return false; + return node.type === 'Identifier' && node.name === 'useEffectEvent'; } function isUseIdentifier(node: Node): boolean {