[flow] remove custom suppress comment config (#25170)

This commit is contained in:
Jan Kassens 2022-09-01 12:55:59 -04:00 committed by GitHub
parent 2e7f422fea
commit f0efa1164b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 24 additions and 34 deletions

View File

@ -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'

View File

@ -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.

View File

@ -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': {

View File

@ -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': {

View File

@ -69,14 +69,14 @@ function findHostInstance_DEPRECATED<TElementType: ElementType>(
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);
}

View File

@ -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);
}

View File

@ -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;

View File

@ -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;

View File

@ -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<string, Family> = new Map();
const allFamiliesByType: // $FlowIssue
const allFamiliesByType: // $FlowFixMe
WeakMap<any, Family> | Map<any, Family> = new PossiblyWeakMap();
const allSignaturesByType: // $FlowIssue
const allSignaturesByType: // $FlowFixMe
WeakMap<any, Signature> | Map<any, Signature> = 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<any, Family> | Map<any, Family> = new PossiblyWeakMap();
// This is cleared on every performReactRefresh() call.
@ -74,8 +74,8 @@ const failedRoots: Set<FiberRoot> = 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<any, ReactNodeList> | null = // $FlowIssue
// $FlowFixMe
const rootElements: WeakMap<any, ReactNodeList> | null = // $FlowFixMe
typeof WeakMap === 'function' ? new WeakMap() : null;
let isPerformingRefresh = false;

View File

@ -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