diff --git a/fixtures/devtools/regression/shared.js b/fixtures/devtools/regression/shared.js index 0010fd7ebbb58..920bd9d130d6f 100644 --- a/fixtures/devtools/regression/shared.js +++ b/fixtures/devtools/regression/shared.js @@ -1,4 +1,4 @@ -/* eslint-disable no-fallthrough, react/react-in-jsx-scope, react/jsx-no-undef */ +/* eslint-disable react/react-in-jsx-scope, react/jsx-no-undef */ /* global React ReactCache ReactDOM SchedulerTracing ScheduleTracing */ const apps = []; diff --git a/packages/react-dom-bindings/src/client/ReactDOMComponent.js b/packages/react-dom-bindings/src/client/ReactDOMComponent.js index 20395d09ac090..4deb8943a196f 100644 --- a/packages/react-dom-bindings/src/client/ReactDOMComponent.js +++ b/packages/react-dom-bindings/src/client/ReactDOMComponent.js @@ -350,7 +350,6 @@ function setProp( } } // Fall through to the last case which shouldn't remove empty strings. - // eslint-disable-next-line no-fallthrough case 'formAction': { if ( value == null || @@ -663,7 +662,7 @@ function setProp( if (enableCustomElementPropertySupport) { break; } - // eslint-disable-next-line no-fallthrough + // Fall through default: { if ( key.length > 2 && @@ -761,7 +760,7 @@ function setPropOnCustomElement( if (enableCustomElementPropertySupport) { break; } - // eslint-disable-next-line no-fallthrough + // Fall through default: { if (registrationNameDependencies.hasOwnProperty(key)) { if (__DEV__ && value != null && typeof value !== 'function') { @@ -1010,7 +1009,6 @@ export function setInitialProperties( listenToNonDelegatedEvent('load', domElement); // We fallthrough to the return of the void elements } - // eslint-disable-next-line no-fallthrough case 'area': case 'base': case 'br': @@ -1174,7 +1172,7 @@ export function diffProperties( 'Cannot update the "is" prop after it has been initialized.', ); } - // eslint-disable-next-line no-fallthrough + // Fall through default: { (updatePayload = updatePayload || []).push(propKey, nextProp); } @@ -1790,7 +1788,7 @@ function diffHydratedCustomComponent( } continue; } - // eslint-disable-next-line no-fallthrough + // Fall through case 'className': if (enableCustomElementPropertySupport) { // className is a special cased property on the server to render as an attribute. @@ -1803,7 +1801,7 @@ function diffHydratedCustomComponent( warnForPropDifference('className', serverValue, value); continue; } - // eslint-disable-next-line no-fallthrough + // Fall through default: { let ownNamespaceDev = parentNamespaceDev; if (ownNamespaceDev === HTML_NAMESPACE) { diff --git a/packages/react-dom-bindings/src/events/ReactDOMEventListener.js b/packages/react-dom-bindings/src/events/ReactDOMEventListener.js index 6fa9f1deb90c5..ab814b1b9053a 100644 --- a/packages/react-dom-bindings/src/events/ReactDOMEventListener.js +++ b/packages/react-dom-bindings/src/events/ReactDOMEventListener.js @@ -319,20 +319,17 @@ export function getEventPriority(domEventName: DOMEventName): EventPriority { case 'touchend': case 'touchstart': case 'volumechange': - // Used by polyfills: - // eslint-disable-next-line no-fallthrough + // Used by polyfills: (fall through) case 'change': case 'selectionchange': case 'textInput': case 'compositionstart': case 'compositionend': case 'compositionupdate': - // Only enableCreateEventHandleAPI: - // eslint-disable-next-line no-fallthrough + // Only enableCreateEventHandleAPI: (fall through) case 'beforeblur': case 'afterblur': - // Not used by React but could be by user code: - // eslint-disable-next-line no-fallthrough + // Not used by React but could be by user code: (fall through) case 'beforeinput': case 'blur': case 'fullscreenchange': @@ -357,8 +354,7 @@ export function getEventPriority(domEventName: DOMEventName): EventPriority { case 'toggle': case 'touchmove': case 'wheel': - // Not used by React but could be by user code: - // eslint-disable-next-line no-fallthrough + // Not used by React but could be by user code: (fall through) case 'mouseenter': case 'mouseleave': case 'pointerenter': diff --git a/packages/react-dom-bindings/src/server/ReactDOMServerFormatConfig.js b/packages/react-dom-bindings/src/server/ReactDOMServerFormatConfig.js index 2df5fb332fa1d..9f1aba93a9a21 100644 --- a/packages/react-dom-bindings/src/server/ReactDOMServerFormatConfig.js +++ b/packages/react-dom-bindings/src/server/ReactDOMServerFormatConfig.js @@ -693,7 +693,6 @@ function pushAttribute( } } // Fall through to the last case which shouldn't remove empty strings. - // eslint-disable-next-line no-fallthrough case 'formAction': { if ( value == null || @@ -1123,11 +1122,9 @@ function pushStartOption( case 'dangerouslySetInnerHTML': innerHTML = propValue; break; - // eslint-disable-next-line-no-fallthrough case 'value': value = propValue; // We intentionally fallthrough to also set the attribute on the node. - // eslint-disable-next-line-no-fallthrough default: pushAttribute(target, propKey, propValue); break; @@ -1248,7 +1245,6 @@ function pushInput( `${'input'} is a self-closing tag and must neither have \`children\` nor ` + 'use `dangerouslySetInnerHTML`.', ); - // eslint-disable-next-line-no-fallthrough case 'defaultChecked': defaultChecked = propValue; break; @@ -1330,7 +1326,6 @@ function pushStartTextArea( throw new Error( '`dangerouslySetInnerHTML` does not make sense on