Skip to content

Commit

Permalink
Remove no-fallthrough lint suppressions (#26553)
Browse files Browse the repository at this point in the history
This reverts commit 5f06848.

DiffTrain build for [6bb8421](6bb8421)
  • Loading branch information
kassens committed Apr 20, 2023
1 parent 3f62582 commit f504564
Show file tree
Hide file tree
Showing 19 changed files with 166 additions and 403 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 @@
1ef9912cc096fa471019a54eff4999b36856288c
6bb84216807f5386d8a83baf9ee464358a68c7bd
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-0b6784ca";
var ReactVersion = "18.3.0-www-modern-d63670f9";

// 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-38982954";
var ReactVersion = "18.3.0-www-classic-afdf1f7f";

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 @@ -12618,9 +12616,8 @@ function throwException(
}

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

default: {
throw new Error(
Expand Down Expand Up @@ -16288,11 +16285,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 @@ -18048,10 +18045,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 @@ -19866,7 +19861,6 @@ function commitLayoutEffectOnFiber(
}

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

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

default:
throw new Error(
Expand Down Expand Up @@ -20685,17 +20677,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 @@ -21191,10 +21180,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 @@ -22203,7 +22190,6 @@ function commitPassiveMountOnFiber(
break;
} // Intentional fallthrough to next branch
}
// eslint-disable-next-line-no-fallthrough

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

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

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

default: {
recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);
Expand Down Expand Up @@ -24259,9 +24243,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 @@ -25416,7 +25397,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 @@ -27806,26 +27786,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 @@ -27834,7 +27814,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 f504564

Please sign in to comment.