Skip to content

Commit e30db61

Browse files
authored
Remove leftover $FlowExpectError comments (#5560)
The ones in window-navigation.ts are handled in #5559. This cleans up the rest.
2 parents 95bb62c + 4f003e3 commit e30db61

File tree

18 files changed

+4
-40
lines changed

18 files changed

+4
-40
lines changed

src/components/app/AppHeader.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ export class AppHeader extends React.PureComponent<{}> {
2222
id="AppHeader--app-header"
2323
elems={{
2424
header: (
25-
// $FlowExpectError Flow doesn't know about this fluent rule for react component.
2625
<InnerNavigationLink
2726
dataSource="none"
2827
className="appHeaderLink"

src/components/app/Home.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,6 @@ class HomeImpl extends React.PureComponent<HomeProps, HomeState> {
660660
id="Home--compare-recordings-info"
661661
elems={{
662662
a: (
663-
// $FlowExpectError Flow doesn't know about this fluent rule for react component.
664663
<InnerNavigationLink dataSource="compare">
665664
Compare
666665
</InnerNavigationLink>

src/components/js-tracer/Chart.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ class JsTracerExpensiveChartImpl extends React.PureComponent<Props> {
104104
chartProps={{
105105
jsTracerTimingRows,
106106
jsTracerTable,
107-
// $FlowFixMe Error introduced by upgrading to v0.96.0. See issue #1936.
108107
updatePreviewSelection,
109108
rangeStart: timeRange.start,
110109
rangeEnd: timeRange.end,

src/components/marker-chart/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ class MarkerChartImpl extends React.PureComponent<Props> {
153153
getMarker,
154154
getMarkerLabel,
155155
markerListLength,
156-
// $FlowFixMe Error introduced by upgrading to v0.96.0. See issue #1936.
157156
updatePreviewSelection,
158157
changeMouseTimePosition,
159158
changeRightClickedMarker,

src/components/stack-chart/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,6 @@ class StackChartImpl extends React.PureComponent<Props> {
266266
combinedTimingRows,
267267
sameWidthsIndexToTimestampMap,
268268
getMarker,
269-
// $FlowFixMe Error introduced by upgrading to v0.96.0. See issue #1936.
270269
updatePreviewSelection,
271270
changeMouseTimePosition,
272271
rangeStart: timeRange.start,

src/components/tooltip/TrackPower.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ class TooltipTrackPowerImpl extends React.PureComponent<Props> {
142142
);
143143

144144
return (
145-
// $FlowExpectError our version of Flow doesn't understand Fragments very well.
146145
<>
147146
{this._formatPowerValue(
148147
powerSumForPreviewRange,

src/profile-logic/merge-compare.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,9 +1363,6 @@ function mergeMarkers(
13631363
);
13641364
}
13651365

1366-
// Flow doesn't know well how to handle the spread operator with our
1367-
// MarkerPayload type.
1368-
// $FlowExpectError
13691366
newMarkerTable.data.push({
13701367
...oldData,
13711368
cause: {

src/test/components/AppLocalizationProvider.test.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ describe('AppLocalizationProvider', () => {
7070
await screen.findByText(translatedText('en-US'))
7171
).toBeInTheDocument();
7272
expect(document.documentElement).toHaveAttribute('lang', 'en-US');
73-
// $FlowExpectError Our version of flow doesn't know about document.dir
7473
expect(document.dir).toBe('ltr');
7574

7675
// Now we're testing the LTR pseudo-localization.
@@ -79,7 +78,6 @@ describe('AppLocalizationProvider', () => {
7978
});
8079
expect(await screen.findByText('Ŧħīş īş ḗḗƞ-ŬŞ Ŧḗḗẋŧ')).toBeInTheDocument();
8180
expect(document.documentElement).toHaveAttribute('lang', 'en-US');
82-
// $FlowExpectError Our version of flow doesn't know about document.dir
8381
expect(document.dir).toBe('ltr');
8482

8583
// And now the RTL pseudo-localization.
@@ -88,7 +86,6 @@ describe('AppLocalizationProvider', () => {
8886
});
8987
expect(await screen.findByText(/ɥıs ıs ǝu-S ǝxʇ/)).toBeInTheDocument();
9088
expect(document.documentElement).toHaveAttribute('lang', 'en-US');
91-
// $FlowExpectError Our version of flow doesn't know about document.dir
9289
expect(document.dir).toBe('rtl');
9390

9491
// Back to no pseudo-localization
@@ -99,7 +96,6 @@ describe('AppLocalizationProvider', () => {
9996
await screen.findByText(translatedText('en-US'))
10097
).toBeInTheDocument();
10198
expect(document.documentElement).toHaveAttribute('lang', 'en-US');
102-
// $FlowExpectError Our version of flow doesn't know about document.dir
10399
expect(document.dir).toBe('ltr');
104100
});
105101

@@ -136,7 +132,6 @@ describe('AppLocalizationProvider', () => {
136132
await screen.findByText(translatedText('en-US'))
137133
).toBeInTheDocument();
138134
expect(document.documentElement).toHaveAttribute('lang', 'en-US');
139-
// $FlowExpectError Our version of flow doesn't know about document.dir
140135
expect(document.dir).toBe('ltr');
141136

142137
// Switch to german
@@ -146,7 +141,6 @@ describe('AppLocalizationProvider', () => {
146141
});
147142
expect(await screen.findByText(translatedText('de'))).toBeInTheDocument();
148143
expect(document.documentElement).toHaveAttribute('lang', 'de');
149-
// $FlowExpectError Our version of flow doesn't know about document.dir
150144
expect(document.dir).toBe('ltr');
151145
});
152146

src/test/components/BeforeUnloadManager.test.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,8 @@ describe('app/BeforeUnloadManager', () => {
3838
const event = new Event('beforeunload');
3939

4040
/* Because of the current jsdom implementation, we need to mock
41-
preventDefault(). To prevent a Flow error when assigning jest.fn()
42-
to event.preventDefault (not writeable), we add the following line.
41+
preventDefault().
4342
*/
44-
// $FlowExpectError
4543
event.preventDefault = jest.fn();
4644

4745
fireEvent(window as any, event);

src/test/components/FooterLinks.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ beforeEach(() => {
1919
.get(fetchUrlRe, ({ url }: { url: string }) => {
2020
const matchUrlResult = fetchUrlRe.exec(url);
2121
if (matchUrlResult) {
22-
// $FlowExpectError Our Flow doesn't know about named groups.
2322
const { language } = matchUrlResult.groups!;
2423
const path = `locales/${language}/app.ftl`;
2524
if (fs.existsSync(path)) {

0 commit comments

Comments
 (0)