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 [790ebc9](790ebc9)
  • Loading branch information
sophiebits committed Apr 5, 2023
1 parent 82b97bf commit 45dac60
Show file tree
Hide file tree
Showing 26 changed files with 4,688 additions and 10,836 deletions.
4 changes: 1 addition & 3 deletions compiled/facebook-www/JSXDEVRuntime-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ function getComponentNameFromType(type) {
return "Cache";
}

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

case REACT_TRACING_MARKER_TYPE:
if (enableTransitionTracing) {
Expand Down Expand Up @@ -260,8 +260,6 @@ function getComponentNameFromType(type) {
var context2 = type;
return (context2.displayName || context2._globalName) + ".Provider";
}

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

Expand Down
4 changes: 1 addition & 3 deletions compiled/facebook-www/JSXDEVRuntime-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ function getComponentNameFromType(type) {
return "Cache";
}

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

case REACT_TRACING_MARKER_TYPE:
if (enableTransitionTracing) {
Expand Down Expand Up @@ -260,8 +260,6 @@ function getComponentNameFromType(type) {
var context2 = type;
return (context2.displayName || context2._globalName) + ".Provider";
}

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

Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d5fd60f7e663a5cee61636f8f2dd174efa0fb2f0
790ebc962de573a37e4755207eba91b07a0fa172
6 changes: 2 additions & 4 deletions compiled/facebook-www/React-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if (
}
"use strict";

var ReactVersion = "18.3.0-www-classic-d31cfc1b";
var ReactVersion = "18.3.0-www-classic-0ae2769a";

// ATTENTION
// When adding new symbols to this file,
Expand Down Expand Up @@ -543,7 +543,7 @@ function getComponentNameFromType(type) {
return "Cache";
}

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

case REACT_TRACING_MARKER_TYPE:
if (enableTransitionTracing) {
Expand Down Expand Up @@ -589,8 +589,6 @@ function getComponentNameFromType(type) {
var context2 = type;
return (context2.displayName || context2._globalName) + ".Provider";
}

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

Expand Down
6 changes: 2 additions & 4 deletions compiled/facebook-www/React-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if (
}
"use strict";

var ReactVersion = "18.3.0-www-modern-51b176b7";
var ReactVersion = "18.3.0-www-modern-845af70b";

// ATTENTION
// When adding new symbols to this file,
Expand Down Expand Up @@ -543,7 +543,7 @@ function getComponentNameFromType(type) {
return "Cache";
}

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

case REACT_TRACING_MARKER_TYPE:
if (enableTransitionTracing) {
Expand Down Expand Up @@ -589,8 +589,6 @@ function getComponentNameFromType(type) {
var context2 = type;
return (context2.displayName || context2._globalName) + ".Provider";
}

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

Expand Down
40 changes: 10 additions & 30 deletions compiled/facebook-www/ReactART-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
return self;
}

var ReactVersion = "18.3.0-www-classic-b1a3b1a3";
var ReactVersion = "18.3.0-www-classic-2747f957";

var LegacyRoot = 0;
var ConcurrentRoot = 1;
Expand Down Expand Up @@ -326,7 +326,7 @@ function getComponentNameFromType(type) {
return "Cache";
}

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

case REACT_TRACING_MARKER_TYPE:
if (enableTransitionTracing) {
Expand Down Expand Up @@ -372,8 +372,6 @@ function getComponentNameFromType(type) {
var context2 = type;
return (context2.displayName || context2._globalName) + ".Provider";
}

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

Expand Down Expand Up @@ -12599,9 +12597,8 @@ function throwException(
}

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

default: {
throw new Error(
Expand Down Expand Up @@ -16269,11 +16266,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 @@ -18029,10 +18026,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 @@ -19845,7 +19840,6 @@ function commitLayoutEffectOnFiber(
}

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

case HostSingleton:
case HostComponent: {
Expand Down Expand Up @@ -20479,7 +20473,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 @@ -20508,7 +20501,6 @@ function commitPlacement(finishedWork) {
);
break;
}
// eslint-disable-next-line-no-fallthrough

default:
throw new Error(
Expand Down Expand Up @@ -20664,17 +20656,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 @@ -21167,10 +21156,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 @@ -22179,7 +22166,6 @@ function commitPassiveMountOnFiber(
break;
} // Intentional fallthrough to next branch
}
// eslint-disable-next-line-no-fallthrough

default: {
recursivelyTraversePassiveMountEffects(
Expand Down Expand Up @@ -22379,7 +22365,6 @@ function reconnectPassiveEffects(
break;
} // Intentional fallthrough to next branch
}
// eslint-disable-next-line-no-fallthrough

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

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

default: {
recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);
Expand Down Expand Up @@ -24232,9 +24216,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 @@ -25389,7 +25370,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 @@ -27779,26 +27759,26 @@ function createFiberFromTypeAndProps(
return createFiberFromLegacyHidden(pendingProps, mode, lanes, key);
}

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

case REACT_SCOPE_TYPE: {
return createFiberFromScope(type, pendingProps, mode, lanes, key);
}

// 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:
if (enableTransitionTracing) {
return createFiberFromTracingMarker(pendingProps, mode, lanes, key);
}

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

case REACT_DEBUG_TRACING_MODE_TYPE:
if (enableDebugTracing) {
Expand All @@ -27807,7 +27787,7 @@ function createFiberFromTypeAndProps(
break;
}

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

default: {
if (typeof type === "object" && type !== null) {
Expand Down
Loading

0 comments on commit 45dac60

Please sign in to comment.