Skip to content

Commit f0efa11

Browse files
authored
[flow] remove custom suppress comment config (#25170)
1 parent 2e7f422 commit f0efa11

File tree

10 files changed

+24
-34
lines changed

10 files changed

+24
-34
lines changed

packages/react-dom/src/client/ReactDOM.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ setAttemptHydrationAtPriority(runWithPriority);
8282
if (__DEV__) {
8383
if (
8484
typeof Map !== 'function' ||
85-
// $FlowIssue Flow incorrectly thinks Map has no prototype
85+
// $FlowFixMe Flow incorrectly thinks Map has no prototype
8686
Map.prototype == null ||
8787
typeof Map.prototype.forEach !== 'function' ||
8888
typeof Set !== 'function' ||
89-
// $FlowIssue Flow incorrectly thinks Set has no prototype
89+
// $FlowFixMe Flow incorrectly thinks Set has no prototype
9090
Set.prototype == null ||
9191
typeof Set.prototype.clear !== 'function' ||
9292
typeof Set.prototype.forEach !== 'function'

packages/react-dom/src/client/ReactDOMComponent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ export function createElement(
420420
const firstChild = ((div.firstChild: any): HTMLScriptElement);
421421
domElement = div.removeChild(firstChild);
422422
} else if (typeof props.is === 'string') {
423-
// $FlowIssue `createElement` should be updated for Web Components
423+
// $FlowFixMe `createElement` should be updated for Web Components
424424
domElement = ownerDocument.createElement(type, {is: props.is});
425425
} else {
426426
// Separate else branch instead of using `props.is || undefined` above because of a Firefox bug.

packages/react-dom/src/server/ReactDOMServerFormatConfig.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ function pushAttribute(
477477
// shouldRemoveAttribute
478478
switch (typeof value) {
479479
case 'function':
480-
// $FlowIssue symbol is perfectly valid here
480+
// $FlowFixMe symbol is perfectly valid here
481481
case 'symbol': // eslint-disable-line
482482
return;
483483
case 'boolean': {
@@ -586,7 +586,7 @@ function pushAttribute(
586586
// shouldRemoveAttribute
587587
switch (typeof value) {
588588
case 'function':
589-
// $FlowIssue symbol is perfectly valid here
589+
// $FlowFixMe symbol is perfectly valid here
590590
case 'symbol': // eslint-disable-line
591591
return;
592592
case 'boolean': {

packages/react-dom/src/shared/DOMProperty.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export function shouldRemoveAttributeWithWarning(
123123
}
124124
switch (typeof value) {
125125
case 'function':
126-
// $FlowIssue symbol is perfectly valid here
126+
// $FlowFixMe symbol is perfectly valid here
127127
case 'symbol': // eslint-disable-line
128128
return true;
129129
case 'boolean': {

packages/react-native-renderer/src/ReactFabric.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ function findHostInstance_DEPRECATED<TElementType: ElementType>(
6969
if (componentOrHandle == null) {
7070
return null;
7171
}
72-
// $FlowIssue Flow has hardcoded values for React DOM that don't work with RN
72+
// $FlowFixMe Flow has hardcoded values for React DOM that don't work with RN
7373
if (componentOrHandle._nativeTag) {
74-
// $FlowIssue Flow has hardcoded values for React DOM that don't work with RN
74+
// $FlowFixMe Flow has hardcoded values for React DOM that don't work with RN
7575
return componentOrHandle;
7676
}
77-
// $FlowIssue Flow has hardcoded values for React DOM that don't work with RN
77+
// $FlowFixMe Flow has hardcoded values for React DOM that don't work with RN
7878
if (componentOrHandle.canonical && componentOrHandle.canonical._nativeTag) {
79-
// $FlowIssue Flow has hardcoded values for React DOM that don't work with RN
79+
// $FlowFixMe Flow has hardcoded values for React DOM that don't work with RN
8080
return componentOrHandle.canonical;
8181
}
8282
let hostInstance;
@@ -226,7 +226,7 @@ function render(
226226
}
227227
updateContainer(element, root, null, callback);
228228

229-
// $FlowIssue Flow has hardcoded values for React DOM that don't work with RN
229+
// $FlowFixMe Flow has hardcoded values for React DOM that don't work with RN
230230
return getPublicRootInstance(root);
231231
}
232232

packages/react-native-renderer/src/ReactNativeRenderer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ function render(
222222
}
223223
updateContainer(element, root, null, callback);
224224

225-
// $FlowIssue Flow has hardcoded values for React DOM that don't work with RN
225+
// $FlowFixMe Flow has hardcoded values for React DOM that don't work with RN
226226
return getPublicRootInstance(root);
227227
}
228228

packages/react-reconciler/src/ReactFiberAct.new.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ export function isLegacyActEnvironment(fiber: Fiber) {
2323
// to false.
2424

2525
const isReactActEnvironmentGlobal =
26-
// $FlowExpectedError – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global
26+
// $FlowFixMe – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global
2727
typeof IS_REACT_ACT_ENVIRONMENT !== 'undefined'
2828
? IS_REACT_ACT_ENVIRONMENT
2929
: undefined;
3030

31-
// $FlowExpectedError - Flow doesn't know about jest
31+
// $FlowFixMe - Flow doesn't know about jest
3232
const jestIsDefined = typeof jest !== 'undefined';
3333
return (
3434
warnsIfNotActing && jestIsDefined && isReactActEnvironmentGlobal !== false
@@ -40,7 +40,7 @@ export function isLegacyActEnvironment(fiber: Fiber) {
4040
export function isConcurrentActEnvironment() {
4141
if (__DEV__) {
4242
const isReactActEnvironmentGlobal =
43-
// $FlowExpectedError – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global
43+
// $FlowFixMe – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global
4444
typeof IS_REACT_ACT_ENVIRONMENT !== 'undefined'
4545
? IS_REACT_ACT_ENVIRONMENT
4646
: undefined;

packages/react-reconciler/src/ReactFiberAct.old.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ export function isLegacyActEnvironment(fiber: Fiber) {
2323
// to false.
2424

2525
const isReactActEnvironmentGlobal =
26-
// $FlowExpectedError – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global
26+
// $FlowFixMe – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global
2727
typeof IS_REACT_ACT_ENVIRONMENT !== 'undefined'
2828
? IS_REACT_ACT_ENVIRONMENT
2929
: undefined;
3030

31-
// $FlowExpectedError - Flow doesn't know about jest
31+
// $FlowFixMe - Flow doesn't know about jest
3232
const jestIsDefined = typeof jest !== 'undefined';
3333
return (
3434
warnsIfNotActing && jestIsDefined && isReactActEnvironmentGlobal !== false
@@ -40,7 +40,7 @@ export function isLegacyActEnvironment(fiber: Fiber) {
4040
export function isConcurrentActEnvironment() {
4141
if (__DEV__) {
4242
const isReactActEnvironmentGlobal =
43-
// $FlowExpectedError – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global
43+
// $FlowFixMe – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global
4444
typeof IS_REACT_ACT_ENVIRONMENT !== 'undefined'
4545
? IS_REACT_ACT_ENVIRONMENT
4646
: undefined;

packages/react-refresh/src/ReactFreshRuntime.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ const PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
4747
// We never remove these associations.
4848
// It's OK to reference families, but use WeakMap/Set for types.
4949
const allFamiliesByID: Map<string, Family> = new Map();
50-
const allFamiliesByType: // $FlowIssue
50+
const allFamiliesByType: // $FlowFixMe
5151
WeakMap<any, Family> | Map<any, Family> = new PossiblyWeakMap();
52-
const allSignaturesByType: // $FlowIssue
52+
const allSignaturesByType: // $FlowFixMe
5353
WeakMap<any, Signature> | Map<any, Signature> = new PossiblyWeakMap();
5454
// This WeakMap is read by React, so we only put families
5555
// that have actually been edited here. This keeps checks fast.
56-
// $FlowIssue
57-
const updatedFamiliesByType: // $FlowIssue
56+
// $FlowFixMe
57+
const updatedFamiliesByType: // $FlowFixMe
5858
WeakMap<any, Family> | Map<any, Family> = new PossiblyWeakMap();
5959

6060
// This is cleared on every performReactRefresh() call.
@@ -74,8 +74,8 @@ const failedRoots: Set<FiberRoot> = new Set();
7474
// In environments that support WeakMap, we also remember the last element for every root.
7575
// It needs to be weak because we do this even for roots that failed to mount.
7676
// If there is no WeakMap, we won't attempt to do retrying.
77-
// $FlowIssue
78-
const rootElements: WeakMap<any, ReactNodeList> | null = // $FlowIssue
77+
// $FlowFixMe
78+
const rootElements: WeakMap<any, ReactNodeList> | null = // $FlowFixMe
7979
typeof WeakMap === 'function' ? new WeakMap() : null;
8080

8181
let isPerformingRefresh = false;

scripts/flow/config/flowconfig

-10
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,5 @@ esproposal.optional_chaining=enable
4949

5050
munge_underscores=false
5151

52-
suppress_type=$FlowIssue
53-
suppress_type=$FlowFixMe
54-
suppress_type=$FixMe
55-
suppress_type=$FlowExpectedError
56-
57-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe
58-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue
59-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
60-
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
61-
6252
[version]
6353
^0.97.0

0 commit comments

Comments
 (0)