Skip to content

Commit 191f8c8

Browse files
committed
[lint] Allow useEffectEvent in useLayoutEffect and useInsertionEffect (#34492)
--- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/34492). * #34497 * __->__ #34492 DiffTrain build for [e02c173](e02c173)
1 parent 1c44392 commit 191f8c8

35 files changed

+89
-89
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57359,8 +57359,8 @@ function getNodeWithoutReactNamespace(node) {
5735957359
}
5736057360
return node;
5736157361
}
57362-
function isUseEffectIdentifier(node) {
57363-
return node.type === 'Identifier' && node.name === 'useEffect';
57362+
function isEffectIdentifier(node) {
57363+
return node.type === 'Identifier' && (node.name === 'useEffect' || node.name === 'useLayoutEffect' || node.name === 'useInsertionEffect');
5736457364
}
5736557365
function isUseEffectEventIdentifier(node) {
5736657366
{
@@ -57660,7 +57660,7 @@ const rule = {
5766057660
reactHooks.push(node.callee);
5766157661
}
5766257662
const nodeWithoutNamespace = getNodeWithoutReactNamespace(node.callee);
57663-
if ((isUseEffectIdentifier(nodeWithoutNamespace) ||
57663+
if ((isEffectIdentifier(nodeWithoutNamespace) ||
5766457664
isUseEffectEventIdentifier(nodeWithoutNamespace)) &&
5766557665
node.arguments.length > 0) {
5766657666
lastEffect = node;

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
720bb130694169f8d1bf1e8001a2177dd18cdf92
1+
e02c173fa597ce914c6876f71556c39bf20f40dc
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
720bb130694169f8d1bf1e8001a2177dd18cdf92
1+
e02c173fa597ce914c6876f71556c39bf20f40dc

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1419,7 +1419,7 @@ __DEV__ &&
14191419
exports.useTransition = function () {
14201420
return resolveDispatcher().useTransition();
14211421
};
1422-
exports.version = "19.2.0-www-classic-720bb130-20250922";
1422+
exports.version = "19.2.0-www-classic-e02c173f-20250923";
14231423
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
14241424
"function" ===
14251425
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
@@ -1419,7 +1419,7 @@ __DEV__ &&
14191419
exports.useTransition = function () {
14201420
return resolveDispatcher().useTransition();
14211421
};
1422-
exports.version = "19.2.0-www-modern-720bb130-20250922";
1422+
exports.version = "19.2.0-www-modern-e02c173f-20250923";
14231423
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
14241424
"function" ===
14251425
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
@@ -602,4 +602,4 @@ exports.useSyncExternalStore = function (
602602
exports.useTransition = function () {
603603
return ReactSharedInternals.H.useTransition();
604604
};
605-
exports.version = "19.2.0-www-classic-720bb130-20250922";
605+
exports.version = "19.2.0-www-classic-e02c173f-20250923";

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,4 +602,4 @@ exports.useSyncExternalStore = function (
602602
exports.useTransition = function () {
603603
return ReactSharedInternals.H.useTransition();
604604
};
605-
exports.version = "19.2.0-www-modern-720bb130-20250922";
605+
exports.version = "19.2.0-www-modern-e02c173f-20250923";

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ exports.useSyncExternalStore = function (
606606
exports.useTransition = function () {
607607
return ReactSharedInternals.H.useTransition();
608608
};
609-
exports.version = "19.2.0-www-classic-720bb130-20250922";
609+
exports.version = "19.2.0-www-classic-e02c173f-20250923";
610610
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
611611
"function" ===
612612
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
@@ -606,7 +606,7 @@ exports.useSyncExternalStore = function (
606606
exports.useTransition = function () {
607607
return ReactSharedInternals.H.useTransition();
608608
};
609-
exports.version = "19.2.0-www-modern-720bb130-20250922";
609+
exports.version = "19.2.0-www-modern-e02c173f-20250923";
610610
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
611611
"function" ===
612612
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
@@ -20242,10 +20242,10 @@ __DEV__ &&
2024220242
(function () {
2024320243
var internals = {
2024420244
bundleType: 1,
20245-
version: "19.2.0-www-classic-720bb130-20250922",
20245+
version: "19.2.0-www-classic-e02c173f-20250923",
2024620246
rendererPackageName: "react-art",
2024720247
currentDispatcherRef: ReactSharedInternals,
20248-
reconcilerVersion: "19.2.0-www-classic-720bb130-20250922"
20248+
reconcilerVersion: "19.2.0-www-classic-e02c173f-20250923"
2024920249
};
2025020250
internals.overrideHookState = overrideHookState;
2025120251
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -20279,7 +20279,7 @@ __DEV__ &&
2027920279
exports.Shape = Shape;
2028020280
exports.Surface = Surface;
2028120281
exports.Text = Text;
20282-
exports.version = "19.2.0-www-classic-720bb130-20250922";
20282+
exports.version = "19.2.0-www-classic-e02c173f-20250923";
2028320283
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
2028420284
"function" ===
2028520285
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)