diff --git a/packages/react-dom/src/client/ReactDOM.js b/packages/react-dom/src/client/ReactDOM.js index 1c664588407bc..406cda4f266a8 100644 --- a/packages/react-dom/src/client/ReactDOM.js +++ b/packages/react-dom/src/client/ReactDOM.js @@ -82,11 +82,11 @@ setAttemptHydrationAtPriority(runWithPriority); if (__DEV__) { if ( typeof Map !== 'function' || - // $FlowIssue Flow incorrectly thinks Map has no prototype + // $FlowFixMe Flow incorrectly thinks Map has no prototype Map.prototype == null || typeof Map.prototype.forEach !== 'function' || typeof Set !== 'function' || - // $FlowIssue Flow incorrectly thinks Set has no prototype + // $FlowFixMe Flow incorrectly thinks Set has no prototype Set.prototype == null || typeof Set.prototype.clear !== 'function' || typeof Set.prototype.forEach !== 'function' diff --git a/packages/react-dom/src/client/ReactDOMComponent.js b/packages/react-dom/src/client/ReactDOMComponent.js index 8b48bae61a497..defc3d93fc036 100644 --- a/packages/react-dom/src/client/ReactDOMComponent.js +++ b/packages/react-dom/src/client/ReactDOMComponent.js @@ -420,7 +420,7 @@ export function createElement( const firstChild = ((div.firstChild: any): HTMLScriptElement); domElement = div.removeChild(firstChild); } else if (typeof props.is === 'string') { - // $FlowIssue `createElement` should be updated for Web Components + // $FlowFixMe `createElement` should be updated for Web Components domElement = ownerDocument.createElement(type, {is: props.is}); } else { // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug. diff --git a/packages/react-dom/src/server/ReactDOMServerFormatConfig.js b/packages/react-dom/src/server/ReactDOMServerFormatConfig.js index 308e35a20b3ae..c30d9673265c2 100644 --- a/packages/react-dom/src/server/ReactDOMServerFormatConfig.js +++ b/packages/react-dom/src/server/ReactDOMServerFormatConfig.js @@ -477,7 +477,7 @@ function pushAttribute( // shouldRemoveAttribute switch (typeof value) { case 'function': - // $FlowIssue symbol is perfectly valid here + // $FlowFixMe symbol is perfectly valid here case 'symbol': // eslint-disable-line return; case 'boolean': { @@ -586,7 +586,7 @@ function pushAttribute( // shouldRemoveAttribute switch (typeof value) { case 'function': - // $FlowIssue symbol is perfectly valid here + // $FlowFixMe symbol is perfectly valid here case 'symbol': // eslint-disable-line return; case 'boolean': { diff --git a/packages/react-dom/src/shared/DOMProperty.js b/packages/react-dom/src/shared/DOMProperty.js index b5540debb71df..f1d4ec132ea07 100644 --- a/packages/react-dom/src/shared/DOMProperty.js +++ b/packages/react-dom/src/shared/DOMProperty.js @@ -123,7 +123,7 @@ export function shouldRemoveAttributeWithWarning( } switch (typeof value) { case 'function': - // $FlowIssue symbol is perfectly valid here + // $FlowFixMe symbol is perfectly valid here case 'symbol': // eslint-disable-line return true; case 'boolean': { diff --git a/packages/react-native-renderer/src/ReactFabric.js b/packages/react-native-renderer/src/ReactFabric.js index e08a98653fb6c..1010b4a4b84ad 100644 --- a/packages/react-native-renderer/src/ReactFabric.js +++ b/packages/react-native-renderer/src/ReactFabric.js @@ -69,14 +69,14 @@ function findHostInstance_DEPRECATED( if (componentOrHandle == null) { return null; } - // $FlowIssue Flow has hardcoded values for React DOM that don't work with RN + // $FlowFixMe Flow has hardcoded values for React DOM that don't work with RN if (componentOrHandle._nativeTag) { - // $FlowIssue Flow has hardcoded values for React DOM that don't work with RN + // $FlowFixMe Flow has hardcoded values for React DOM that don't work with RN return componentOrHandle; } - // $FlowIssue Flow has hardcoded values for React DOM that don't work with RN + // $FlowFixMe Flow has hardcoded values for React DOM that don't work with RN if (componentOrHandle.canonical && componentOrHandle.canonical._nativeTag) { - // $FlowIssue Flow has hardcoded values for React DOM that don't work with RN + // $FlowFixMe Flow has hardcoded values for React DOM that don't work with RN return componentOrHandle.canonical; } let hostInstance; @@ -226,7 +226,7 @@ function render( } updateContainer(element, root, null, callback); - // $FlowIssue Flow has hardcoded values for React DOM that don't work with RN + // $FlowFixMe Flow has hardcoded values for React DOM that don't work with RN return getPublicRootInstance(root); } diff --git a/packages/react-native-renderer/src/ReactNativeRenderer.js b/packages/react-native-renderer/src/ReactNativeRenderer.js index e751195dda00a..046c4f4b93734 100644 --- a/packages/react-native-renderer/src/ReactNativeRenderer.js +++ b/packages/react-native-renderer/src/ReactNativeRenderer.js @@ -222,7 +222,7 @@ function render( } updateContainer(element, root, null, callback); - // $FlowIssue Flow has hardcoded values for React DOM that don't work with RN + // $FlowFixMe Flow has hardcoded values for React DOM that don't work with RN return getPublicRootInstance(root); } diff --git a/packages/react-reconciler/src/ReactFiberAct.new.js b/packages/react-reconciler/src/ReactFiberAct.new.js index 27102b5e92531..bad7fd3dc52f7 100644 --- a/packages/react-reconciler/src/ReactFiberAct.new.js +++ b/packages/react-reconciler/src/ReactFiberAct.new.js @@ -23,12 +23,12 @@ export function isLegacyActEnvironment(fiber: Fiber) { // to false. const isReactActEnvironmentGlobal = - // $FlowExpectedError – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global + // $FlowFixMe – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global typeof IS_REACT_ACT_ENVIRONMENT !== 'undefined' ? IS_REACT_ACT_ENVIRONMENT : undefined; - // $FlowExpectedError - Flow doesn't know about jest + // $FlowFixMe - Flow doesn't know about jest const jestIsDefined = typeof jest !== 'undefined'; return ( warnsIfNotActing && jestIsDefined && isReactActEnvironmentGlobal !== false @@ -40,7 +40,7 @@ export function isLegacyActEnvironment(fiber: Fiber) { export function isConcurrentActEnvironment() { if (__DEV__) { const isReactActEnvironmentGlobal = - // $FlowExpectedError – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global + // $FlowFixMe – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global typeof IS_REACT_ACT_ENVIRONMENT !== 'undefined' ? IS_REACT_ACT_ENVIRONMENT : undefined; diff --git a/packages/react-reconciler/src/ReactFiberAct.old.js b/packages/react-reconciler/src/ReactFiberAct.old.js index bcb4ad707a1be..6358ab66a3485 100644 --- a/packages/react-reconciler/src/ReactFiberAct.old.js +++ b/packages/react-reconciler/src/ReactFiberAct.old.js @@ -23,12 +23,12 @@ export function isLegacyActEnvironment(fiber: Fiber) { // to false. const isReactActEnvironmentGlobal = - // $FlowExpectedError – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global + // $FlowFixMe – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global typeof IS_REACT_ACT_ENVIRONMENT !== 'undefined' ? IS_REACT_ACT_ENVIRONMENT : undefined; - // $FlowExpectedError - Flow doesn't know about jest + // $FlowFixMe - Flow doesn't know about jest const jestIsDefined = typeof jest !== 'undefined'; return ( warnsIfNotActing && jestIsDefined && isReactActEnvironmentGlobal !== false @@ -40,7 +40,7 @@ export function isLegacyActEnvironment(fiber: Fiber) { export function isConcurrentActEnvironment() { if (__DEV__) { const isReactActEnvironmentGlobal = - // $FlowExpectedError – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global + // $FlowFixMe – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global typeof IS_REACT_ACT_ENVIRONMENT !== 'undefined' ? IS_REACT_ACT_ENVIRONMENT : undefined; diff --git a/packages/react-refresh/src/ReactFreshRuntime.js b/packages/react-refresh/src/ReactFreshRuntime.js index 1ae5acfdfb535..d50d7ce907df1 100644 --- a/packages/react-refresh/src/ReactFreshRuntime.js +++ b/packages/react-refresh/src/ReactFreshRuntime.js @@ -47,14 +47,14 @@ const PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; // We never remove these associations. // It's OK to reference families, but use WeakMap/Set for types. const allFamiliesByID: Map = new Map(); -const allFamiliesByType: // $FlowIssue +const allFamiliesByType: // $FlowFixMe WeakMap | Map = new PossiblyWeakMap(); -const allSignaturesByType: // $FlowIssue +const allSignaturesByType: // $FlowFixMe WeakMap | Map = new PossiblyWeakMap(); // This WeakMap is read by React, so we only put families // that have actually been edited here. This keeps checks fast. -// $FlowIssue -const updatedFamiliesByType: // $FlowIssue +// $FlowFixMe +const updatedFamiliesByType: // $FlowFixMe WeakMap | Map = new PossiblyWeakMap(); // This is cleared on every performReactRefresh() call. @@ -74,8 +74,8 @@ const failedRoots: Set = new Set(); // In environments that support WeakMap, we also remember the last element for every root. // It needs to be weak because we do this even for roots that failed to mount. // If there is no WeakMap, we won't attempt to do retrying. -// $FlowIssue -const rootElements: WeakMap | null = // $FlowIssue +// $FlowFixMe +const rootElements: WeakMap | null = // $FlowFixMe typeof WeakMap === 'function' ? new WeakMap() : null; let isPerformingRefresh = false; diff --git a/scripts/flow/config/flowconfig b/scripts/flow/config/flowconfig index c0647c95468af..9c10ba265dce2 100644 --- a/scripts/flow/config/flowconfig +++ b/scripts/flow/config/flowconfig @@ -49,15 +49,5 @@ esproposal.optional_chaining=enable munge_underscores=false -suppress_type=$FlowIssue -suppress_type=$FlowFixMe -suppress_type=$FixMe -suppress_type=$FlowExpectedError - -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe -suppress_comment=\\(.\\|\n\\)*\\$FlowIssue -suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy -suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError - [version] ^0.97.0