Skip to content

Commit 0ef3292

Browse files
committed
[eslint-plugin-react-hooks] fix exhaustive deps lint rule with component syntax (facebook#33182)
DiffTrain build for [4448b18](facebook@4448b18)
1 parent 7c9b056 commit 0ef3292

35 files changed

+89
-87
lines changed

compiled/eslint-plugin-react-hooks/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ const rule$2 = {
135135
let currentScope = scope.upper;
136136
while (currentScope) {
137137
pureScopes.add(currentScope);
138-
if (currentScope.type === 'function') {
138+
if (currentScope.type === 'function' ||
139+
currentScope.type === 'hook' ||
140+
currentScope.type === 'component') {
139141
break;
140142
}
141143
currentScope = currentScope.upper;

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
65b5aae010002ef88221cc4998711eaef6068006
1+
4448b18760d867f9e009e810571e7a3b8930bb19
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
65b5aae010002ef88221cc4998711eaef6068006
1+
4448b18760d867f9e009e810571e7a3b8930bb19

compiled/facebook-www/React-dev.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1537,7 +1537,7 @@ __DEV__ &&
15371537
exports.useTransition = function () {
15381538
return resolveDispatcher().useTransition();
15391539
};
1540-
exports.version = "19.2.0-www-classic-65b5aae0-20250515";
1540+
exports.version = "19.2.0-www-classic-4448b187-20250515";
15411541
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
15421542
"function" ===
15431543
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-dev.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1537,7 +1537,7 @@ __DEV__ &&
15371537
exports.useTransition = function () {
15381538
return resolveDispatcher().useTransition();
15391539
};
1540-
exports.version = "19.2.0-www-modern-65b5aae0-20250515";
1540+
exports.version = "19.2.0-www-modern-4448b187-20250515";
15411541
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
15421542
"function" ===
15431543
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-prod.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,4 +635,4 @@ exports.useSyncExternalStore = function (
635635
exports.useTransition = function () {
636636
return ReactSharedInternals.H.useTransition();
637637
};
638-
exports.version = "19.2.0-www-classic-65b5aae0-20250515";
638+
exports.version = "19.2.0-www-classic-4448b187-20250515";

compiled/facebook-www/React-prod.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,4 +635,4 @@ exports.useSyncExternalStore = function (
635635
exports.useTransition = function () {
636636
return ReactSharedInternals.H.useTransition();
637637
};
638-
exports.version = "19.2.0-www-modern-65b5aae0-20250515";
638+
exports.version = "19.2.0-www-modern-4448b187-20250515";

compiled/facebook-www/React-profiling.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ exports.useSyncExternalStore = function (
639639
exports.useTransition = function () {
640640
return ReactSharedInternals.H.useTransition();
641641
};
642-
exports.version = "19.2.0-www-classic-65b5aae0-20250515";
642+
exports.version = "19.2.0-www-classic-4448b187-20250515";
643643
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
644644
"function" ===
645645
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-profiling.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ exports.useSyncExternalStore = function (
639639
exports.useTransition = function () {
640640
return ReactSharedInternals.H.useTransition();
641641
};
642-
exports.version = "19.2.0-www-modern-65b5aae0-20250515";
642+
exports.version = "19.2.0-www-modern-4448b187-20250515";
643643
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
644644
"function" ===
645645
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.classic.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19063,10 +19063,10 @@ __DEV__ &&
1906319063
(function () {
1906419064
var internals = {
1906519065
bundleType: 1,
19066-
version: "19.2.0-www-classic-65b5aae0-20250515",
19066+
version: "19.2.0-www-classic-4448b187-20250515",
1906719067
rendererPackageName: "react-art",
1906819068
currentDispatcherRef: ReactSharedInternals,
19069-
reconcilerVersion: "19.2.0-www-classic-65b5aae0-20250515"
19069+
reconcilerVersion: "19.2.0-www-classic-4448b187-20250515"
1907019070
};
1907119071
internals.overrideHookState = overrideHookState;
1907219072
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -19100,7 +19100,7 @@ __DEV__ &&
1910019100
exports.Shape = Shape;
1910119101
exports.Surface = Surface;
1910219102
exports.Text = Text;
19103-
exports.version = "19.2.0-www-classic-65b5aae0-20250515";
19103+
exports.version = "19.2.0-www-classic-4448b187-20250515";
1910419104
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1910519105
"function" ===
1910619106
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)