Skip to content

Commit

Permalink
Remove no-fallthrough lint suppressions (#26553)
Browse files Browse the repository at this point in the history
The lint rule already understands a normal comment. Also a bunch of
these were unnecessary.

DiffTrain build for commit 790ebc9.
  • Loading branch information
sophiebits committed Apr 5, 2023
1 parent ab8c5b5 commit 3ad019f
Show file tree
Hide file tree
Showing 15 changed files with 43 additions and 105 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,6 @@ function getComponentNameFromType(type) {
var context2 = type;
return (context2.displayName || context2._globalName) + ".Provider";
}

// eslint-disable-next-line no-fallthrough
}
}

Expand Down Expand Up @@ -10518,9 +10516,8 @@ function throwException(
}

break;
}
} // Fall through
}
// eslint-disable-next-line no-fallthrough

default: {
throw new Error(
Expand Down Expand Up @@ -13734,11 +13731,11 @@ function beginWork$1(current, workInProgress, renderLanes) {

case HostHoistable:

// eslint-disable-next-line no-fallthrough
// Fall through

case HostSingleton:

// eslint-disable-next-line no-fallthrough
// Fall through

case HostComponent:
return updateHostComponent$1(current, workInProgress, renderLanes);
Expand Down Expand Up @@ -14916,10 +14913,8 @@ function completeWork(current, workInProgress, renderLanes) {
}

case HostHoistable:
// eslint-disable-next-line-no-fallthrough

case HostSingleton:
// eslint-disable-next-line-no-fallthrough

case HostComponent: {
popHostContext(workInProgress);
Expand Down Expand Up @@ -16760,7 +16755,6 @@ function commitLayoutEffectOnFiber(
}

case HostHoistable:
// eslint-disable-next-line-no-fallthrough

case HostSingleton:
case HostComponent: {
Expand Down Expand Up @@ -17125,7 +17119,6 @@ function commitPlacement(finishedWork) {

switch (parentFiber.tag) {
case HostSingleton:
// eslint-disable-next-line no-fallthrough

case HostComponent: {
var _parent = parentFiber.stateNode;
Expand Down Expand Up @@ -17154,7 +17147,6 @@ function commitPlacement(finishedWork) {
);
break;
}
// eslint-disable-next-line-no-fallthrough

default:
throw new Error(
Expand Down Expand Up @@ -17310,17 +17302,14 @@ function commitDeletionEffectsOnFiber(

switch (deletedFiber.tag) {
case HostHoistable:
// eslint-disable-next-line no-fallthrough

case HostSingleton:
// eslint-disable-next-line no-fallthrough

case HostComponent: {
if (!offscreenSubtreeWasHidden) {
safelyDetachRef(deletedFiber, nearestMountedAncestor);
} // Intentional fallthrough to next branch
}
// eslint-disable-next-line-no-fallthrough

case HostText: {
// We only need to remove the nearest host child. Set the host parent
Expand Down Expand Up @@ -17739,10 +17728,8 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) {
}

case HostHoistable:
// eslint-disable-next-line-no-fallthrough

case HostSingleton:
// eslint-disable-next-line-no-fallthrough

case HostComponent: {
recursivelyTraverseMutationEffects(root, finishedWork);
Expand Down Expand Up @@ -18588,7 +18575,6 @@ function commitPassiveMountOnFiber(
}

case TracingMarkerComponent:
// eslint-disable-next-line-no-fallthrough

default: {
recursivelyTraversePassiveMountEffects(
Expand Down Expand Up @@ -18755,7 +18741,6 @@ function reconnectPassiveEffects(
}

case TracingMarkerComponent:
// eslint-disable-next-line-no-fallthrough

default: {
recursivelyTraverseReconnectPassiveEffects(
Expand Down Expand Up @@ -18829,7 +18814,6 @@ function commitAtomicPassiveEffects(

break;
}
// eslint-disable-next-line-no-fallthrough

default: {
recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);
Expand Down Expand Up @@ -20333,9 +20317,6 @@ function finishConcurrentRender(root, exitStatus, finishedWork, lanes) {
case RootFatalErrored: {
throw new Error("Root did not complete. This is a bug in React.");
}
// Flow knows about invariant, so it complains if I add a break
// statement, but eslint doesn't know about invariant, so it complains
// if I do. eslint-disable-next-line no-fallthrough

case RootErrored: {
// We should have already attempted to retry this tree. If we reached
Expand Down Expand Up @@ -21399,7 +21380,6 @@ function replaySuspendedUnitOfWork(unitOfWork) {
// function component.
unitOfWork.tag = FunctionComponent; // Fallthrough to the next branch.
}
// eslint-disable-next-line no-fallthrough

case SimpleMemoComponent:
case FunctionComponent: {
Expand Down Expand Up @@ -23560,25 +23540,25 @@ function createFiberFromTypeAndProps(

case REACT_LEGACY_HIDDEN_TYPE:

// eslint-disable-next-line no-fallthrough
// Fall through

case REACT_SCOPE_TYPE:

// eslint-disable-next-line no-fallthrough
// Fall through

case REACT_CACHE_TYPE: {
return createFiberFromCache(pendingProps, mode, lanes, key);
}

// eslint-disable-next-line no-fallthrough
// Fall through

case REACT_TRACING_MARKER_TYPE:

// eslint-disable-next-line no-fallthrough
// Fall through

case REACT_DEBUG_TRACING_MODE_TYPE:

// eslint-disable-next-line no-fallthrough
// Fall through

default: {
if (typeof type === "object" && type !== null) {
Expand Down Expand Up @@ -23884,7 +23864,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-next-d5fd60f7e-20230404";
var ReactVersion = "18.3.0-next-790ebc962-20230404";

// Might add PROFILE later.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8683,7 +8683,7 @@ var devToolsConfig$jscomp$inline_1028 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-next-d5fd60f7e-20230404",
version: "18.3.0-next-790ebc962-20230404",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1220 = {
Expand Down Expand Up @@ -8714,7 +8714,7 @@ var internals$jscomp$inline_1220 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-d5fd60f7e-20230404"
reconcilerVersion: "18.3.0-next-790ebc962-20230404"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1221 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9108,7 +9108,7 @@ var devToolsConfig$jscomp$inline_1070 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-next-d5fd60f7e-20230404",
version: "18.3.0-next-790ebc962-20230404",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1261 = {
Expand Down Expand Up @@ -9139,7 +9139,7 @@ var internals$jscomp$inline_1261 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-d5fd60f7e-20230404"
reconcilerVersion: "18.3.0-next-790ebc962-20230404"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1262 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,6 @@ function getComponentNameFromType(type) {
var context2 = type;
return (context2.displayName || context2._globalName) + ".Provider";
}

// eslint-disable-next-line no-fallthrough
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,6 @@ function getComponentNameFromType(type) {
var context2 = type;
return (context2.displayName || context2._globalName) + ".Provider";
}

// eslint-disable-next-line no-fallthrough
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if (
}
"use strict";

var ReactVersion = "18.3.0-next-d5fd60f7e-20230404";
var ReactVersion = "18.3.0-next-790ebc962-20230404";

// ATTENTION
// When adding new symbols to this file,
Expand Down Expand Up @@ -679,8 +679,6 @@ function getComponentNameFromType(type) {
var context2 = type;
return (context2.displayName || context2._globalName) + ".Provider";
}

// eslint-disable-next-line no-fallthrough
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -639,4 +639,4 @@ exports.useSyncExternalStore = function (
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-next-d5fd60f7e-20230404";
exports.version = "18.3.0-next-790ebc962-20230404";
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ exports.useSyncExternalStore = function (
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-next-d5fd60f7e-20230404";
exports.version = "18.3.0-next-790ebc962-20230404";

/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d5fd60f7e663a5cee61636f8f2dd174efa0fb2f0
790ebc962de573a37e4755207eba91b07a0fa172
Loading

0 comments on commit 3ad019f

Please sign in to comment.