Skip to content

Commit 962c710

Browse files
committed
Revert "Bump flow to latest version and fix errors"
This reverts commit f23d679.
1 parent f23d679 commit 962c710

25 files changed

Lines changed: 178 additions & 464 deletions

‎.flowconfig‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
[version]
2-
0.307.1
2+
0.270.0
33

44
[ignore]
55
.*/malformed_package_json/.*
66
<PROJECT_ROOT>/.*/__tests__/.*
77

88
[include]
99

10-
[declarations]
11-
.*/node_modules/.*
12-
1310
[options]
1411
casting_syntax=as
1512
component_syntax=true
1613
module.name_mapper='^react-strict-dom$' -> '<PROJECT_ROOT>/packages/react-strict-dom/dist/native/index.js.flow'
1714
module.system.node.resolve_dirname=flow_modules
1815
module.system.node.resolve_dirname=node_modules
1916
react.runtime=automatic
17+
suppress_type=$FlowIssue
18+
suppress_type=$FlowFixMe
2019

2120
[strict]
2221
nonstrict-import

‎apps/platform-tests/src/components/App.js‎

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -71,30 +71,24 @@ const themedStyles = css.create({
7171

7272
function ThemeExample() {
7373
return (
74-
// $FlowFixMe[incompatible-type]
7574
<html.div style={themedStyles.container}>
7675
{/* default theme */}
77-
{/* $FlowFixMe[incompatible-type] */}
7876
<html.div style={themedStyles.square} />
7977
{/* redblue theme */}
8078
<html.div style={redBlueTheme}>
81-
{/* $FlowFixMe[incompatible-type] */}
8279
<html.div style={themedStyles.square} />
8380
</html.div>
8481
{/* purpleyellow theme */}
8582
<html.div style={purpleYellowTheme}>
86-
{/* $FlowFixMe[incompatible-type] */}
8783
<html.div style={themedStyles.square} />
8884
</html.div>
8985
{/* greenpink theme */}
9086
<html.div style={greenPinkTheme}>
91-
{/* $FlowFixMe[incompatible-type] */}
9287
<html.div style={themedStyles.square} />
9388
</html.div>
9489
{/* nested theme */}
9590
<html.div style={redBlueTheme}>
9691
<html.div style={greenPinkTheme}>
97-
{/* $FlowFixMe[incompatible-type] */}
9892
<html.div style={themedStyles.square} />
9993
</html.div>
10094
</html.div>
@@ -158,7 +152,6 @@ function Shell(): React.MixedElement {
158152
<html.div>dfadsafdsfadsf inside div (kind of) works</html.div>
159153
<html.span>
160154
span inside div inside span...
161-
{/* $FlowFixMe[incompatible-type] */}
162155
<html.div style={styles.textAncestorTest}>
163156
<html.span>works</html.span>
164157
</html.div>
@@ -219,7 +212,6 @@ function Shell(): React.MixedElement {
219212
console.log(e.type, e);
220213
}}
221214
src="http://placehold.jp/150x150.png"
222-
// $FlowFixMe[incompatible-type]
223215
style={styles.objContain}
224216
width={150}
225217
/>
@@ -298,11 +290,8 @@ function Shell(): React.MixedElement {
298290

299291
{/* flex row undoes block layout emulation and correct flex child layout */}
300292
<html.p>display:flex defaults and children</html.p>
301-
{/* $FlowFixMe[incompatible-type] */}
302293
<html.div style={styles.row}>
303-
{/* $FlowFixMe[incompatible-type] */}
304294
<html.div style={[styles.square, styles.w1000]} />
305-
{/* $FlowFixMe[incompatible-type] */}
306295
<html.div style={[styles.square, styles.blueSquare]}>
307296
<html.div style={styles.whiteBox}>
308297
<html.p>Back to block</html.p>
@@ -314,7 +303,6 @@ function Shell(): React.MixedElement {
314303

315304
<html.p>display:block resets flex properties</html.p>
316305
{/* display block undoes row layout and emulates block again */}
317-
{/* $FlowFixMe[incompatible-type] */}
318306
<html.div style={[styles.row, styles.blockW300]}>
319307
<html.div style={styles.square} />
320308
<html.div style={[styles.square, styles.bgBlue]} />
@@ -340,40 +328,31 @@ function Shell(): React.MixedElement {
340328
{/* logical styles emulation */}
341329
<ExampleBlock title="CSS Logical">
342330
<html.div>
343-
{/* $FlowFixMe[incompatible-type] */}
344331
<html.div style={styles.logicalPadding} />
345-
{/* $FlowFixMe[incompatible-type] */}
346332
<html.div style={styles.logicalMargin} />
347-
{/* $FlowFixMe[incompatible-type] */}
348333
<html.div style={styles.logicalBorder} />
349334
</html.div>
350335
</ExampleBlock>
351336

352337
{/* CSS positioning (static by default) */}
353338
<ExampleBlock title="CSS Position">
354-
{/* $FlowFixMe[incompatible-type] */}
355339
<html.div style={[styles.p50, styles.relative]}>
356340
<html.div style={styles.p50}>
357-
{/* $FlowFixMe[incompatible-type] */}
358341
<html.div style={[styles.square, styles.absTopLeft]} />
359342
</html.div>
360-
{/* $FlowFixMe[incompatible-type] */}
361343
<html.div style={[styles.relative, styles.p50]}>
362-
{/* $FlowFixMe[incompatible-type] */}
363344
<html.div style={[styles.square, styles.absTopLeft]} />
364345
</html.div>
365346
</html.div>
366347
</ExampleBlock>
367348

368349
{/* CSS text */}
369350
<ExampleBlock title="CSS Text styles">
370-
{/* $FlowFixMe[incompatible-type] */}
371351
<html.div style={styles.lineHeightUnitless}>
372352
<html.span style={styles.text}>
373353
<html.span style={styles.text}>test</html.span> (unitless)
374354
</html.span>
375355
</html.div>
376-
{/* $FlowFixMe[incompatible-type] */}
377356
<html.div style={styles.lineHeightEm}>
378357
<html.span style={styles.text}>test (em)</html.span>
379358
</html.div>
@@ -483,7 +462,6 @@ function Shell(): React.MixedElement {
483462
</html.button>
484463
<html.p>Transform + Opacity</html.p>
485464
<html.div
486-
// $FlowFixMe[incompatible-type]
487465
style={[
488466
styles.square,
489467
styles.transitionAll,
@@ -500,13 +478,9 @@ function Shell(): React.MixedElement {
500478

501479
{/* visibility */}
502480
<ExampleBlock title="CSS Visibility">
503-
{/* $FlowFixMe[incompatible-type] */}
504481
<html.div style={styles.flex}>
505-
{/* $FlowFixMe[incompatible-type] */}
506482
<html.div style={[styles.square, styles.visibilityCollapse]} />
507-
{/* $FlowFixMe[incompatible-type] */}
508483
<html.div style={[styles.square, styles.visibilityHidden]} />
509-
{/* $FlowFixMe[incompatible-type] */}
510484
<html.div style={[styles.square, styles.visibilityVisible]} />
511485
</html.div>
512486
</ExampleBlock>
@@ -517,7 +491,7 @@ function Shell(): React.MixedElement {
517491
<html.div style={styles.square} />
518492
<html.input
519493
placeholder="input type:text"
520-
// $FlowFixMe[incompatible-type]
494+
// $FlowFixMe
521495
style={styles.input}
522496
type="text"
523497
/>
@@ -537,7 +511,7 @@ function Shell(): React.MixedElement {
537511
<html.div style={styles.square} />
538512
<html.input
539513
placeholder="input type:text"
540-
// $FlowFixMe[incompatible-type]
514+
// $FlowFixMe
541515
style={styles.input}
542516
type="text"
543517
/>
@@ -549,7 +523,7 @@ function Shell(): React.MixedElement {
549523
<html.div style={styles.square} />
550524
<html.input
551525
placeholder="input type:text"
552-
// $FlowFixMe[incompatible-type]
526+
// $FlowFixMe
553527
style={styles.input}
554528
type="text"
555529
/>
@@ -561,7 +535,6 @@ function Shell(): React.MixedElement {
561535

562536
{/* hover */}
563537
<ExampleBlock title="CSS :hover, :focus, :active">
564-
{/* $FlowFixMe[incompatible-type] */}
565538
<html.textarea style={styles.pseudoStates} />
566539
</ExampleBlock>
567540

@@ -608,9 +581,7 @@ function Shell(): React.MixedElement {
608581
style={[styles.h100, styles.dynamicBg(clickData.color)]}
609582
>
610583
<html.span style={styles.bgWhite}>{clickData.text}</html.span>
611-
{/* $FlowFixMe[incompatible-type] */}
612584
<html.div style={styles.flex}>
613-
{/* $FlowFixMe[incompatible-type] */}
614585
<html.div style={[styles.flex, styles.flexGrow]}>
615586
<html.div>
616587
<html.span>
@@ -633,7 +604,6 @@ function Shell(): React.MixedElement {
633604
</html.span>
634605
</html.div>
635606
</html.div>
636-
{/* $FlowFixMe[incompatible-type] */}
637607
<html.div style={[styles.flex, styles.flexGrow]}>
638608
<html.div>
639609
<html.span>button: {clickEventData.button}</html.span>
@@ -654,7 +624,6 @@ function Shell(): React.MixedElement {
654624
setImageLoadText(`${e.type}: loaded`);
655625
}}
656626
src="http://placehold.jp/150x150.png"
657-
// $FlowFixMe[incompatible-type]
658627
style={styles.objContain}
659628
width={150}
660629
/>
@@ -665,7 +634,6 @@ function Shell(): React.MixedElement {
665634
setImageErrorText(`${e.type}: errored`);
666635
}}
667636
src="http://error"
668-
// $FlowFixMe[incompatible-type]
669637
style={styles.objContain}
670638
width={150}
671639
/>

‎flow-typed/environments/bom.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,6 @@ declare class SharedWorker extends EventTarget {
826826
declare function importScripts(...urls: Array<string | TrustedScriptURL>): void;
827827

828828
declare class WorkerGlobalScope extends EventTarget {
829-
// $FlowFixMe[incompatible-variance]
830829
self: this;
831830
location: WorkerLocation;
832831
navigator: WorkerNavigator;

‎flow-typed/environments/dom.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -966,7 +966,6 @@ declare class HTMLCollection<+Elem: Element> {
966966
length: number;
967967
item(nameOrIndex?: any, optionalIndex?: any): Elem | null;
968968
namedItem(name: string): Elem | null;
969-
// $FlowFixMe[incompatible-variance]
970969
[index: number | string]: Elem;
971970
}
972971

‎flow-typed/environments/jsx.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ declare class SyntheticEvent<+T: EventTarget = EventTarget, +E: Event = Event> {
2727
isDefaultPrevented(): boolean;
2828
isPropagationStopped(): boolean;
2929
isTrusted: boolean;
30-
// $FlowFixMe[incompatible-variance]
3130
nativeEvent: E;
3231
persist(): void;
3332
preventDefault(): void;

‎flow-typed/environments/node.js‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1566,7 +1566,6 @@ type http$agentOptions = {
15661566
declare class http$Agent<+SocketT = net$Socket> {
15671567
constructor(options: http$agentOptions): void;
15681568
destroy(): void;
1569-
// $FlowFixMe[incompatible-variance]
15701569
freeSockets: { [name: string]: $ReadOnlyArray<SocketT>, ... };
15711570
getName(options: {
15721571
host: string,
@@ -1576,9 +1575,7 @@ declare class http$Agent<+SocketT = net$Socket> {
15761575
}): string;
15771576
maxFreeSockets: number;
15781577
maxSockets: number;
1579-
// $FlowFixMe[incompatible-variance]
15801578
requests: { [name: string]: $ReadOnlyArray<http$ClientRequest<SocketT>>, ... };
1581-
// $FlowFixMe[incompatible-variance]
15821579
sockets: { [name: string]: $ReadOnlyArray<SocketT>, ... };
15831580
}
15841581

0 commit comments

Comments
 (0)