From 30b8ce97c625a566740ddf272024991daa34127a Mon Sep 17 00:00:00 2001 From: Rick Hanlon Date: Wed, 15 Mar 2023 18:45:26 -0400 Subject: [PATCH 1/2] Sync from oss-experimental, not oss-stable --- .github/workflows/commit_artifacts.yml | 8 ++++---- packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/commit_artifacts.yml b/.github/workflows/commit_artifacts.yml index 7ad7e5a8641db..c7ca458044c06 100644 --- a/.github/workflows/commit_artifacts.yml +++ b/.github/workflows/commit_artifacts.yml @@ -96,8 +96,8 @@ jobs: - name: Strip @license from eslint plugin and react-refresh run: | sed -i -e 's/ @license React*//' \ - build/oss-stable/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js \ - build/oss-stable/react-refresh/cjs/react-refresh-babel.development.js + build/oss-experimental/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js \ + build/oss-experimental/react-refresh/cjs/react-refresh-babel.development.js - name: Move relevant files into compiled run: | mkdir -p ./compiled @@ -111,7 +111,7 @@ jobs: mv build/WARNINGS ./compiled/facebook-www/WARNINGS # Copy eslint-plugin-react-hooks into facebook-www - mv build/oss-stable/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js \ + mv build/oss-experimental/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js \ ./compiled/facebook-www/eslint-plugin-react-hooks.js # Copy unstable_server-external-runtime.js into facebook-www @@ -119,7 +119,7 @@ jobs: ./compiled/facebook-www/unstable_server-external-runtime.js # Copy react-refresh-babel.development.js into babel-plugin-react-refresh - mv build/oss-stable/react-refresh/cjs/react-refresh-babel.development.js \ + mv build/oss-experimental/react-refresh/cjs/react-refresh-babel.development.js \ ./compiled/babel-plugin-react-refresh/index.js ls -R ./compiled diff --git a/packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js b/packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js index da1e3e754e1d8..b9b4b94e68715 100644 --- a/packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js +++ b/packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js @@ -1856,7 +1856,7 @@ function isAncestorNodeOf(a, b) { function isUseEffectEventIdentifier(node) { if (__EXPERIMENTAL__) { - return node.type === 'Identifier' && node.name === 'useEffectEvent'; + return node.type === 'Identifier' && (node.name === 'useEffectEvent' || node.name === 'experimental_useEffectEvent') ; } return false; } From 58ef82f7ae493588c61100545361e091419e6bd7 Mon Sep 17 00:00:00 2001 From: Rick Hanlon Date: Wed, 15 Mar 2023 20:38:50 -0400 Subject: [PATCH 2/2] revert --- packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js b/packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js index b9b4b94e68715..da1e3e754e1d8 100644 --- a/packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js +++ b/packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js @@ -1856,7 +1856,7 @@ function isAncestorNodeOf(a, b) { function isUseEffectEventIdentifier(node) { if (__EXPERIMENTAL__) { - return node.type === 'Identifier' && (node.name === 'useEffectEvent' || node.name === 'experimental_useEffectEvent') ; + return node.type === 'Identifier' && node.name === 'useEffectEvent'; } return false; }