Fixed a bunch of prettier errors after upgrading

Summary: prettier upgrade uncovered more errors

Reviewed By: passy

Differential Revision: D18474908

fbshipit-source-id: b1553000fb3386f2bbd9defdd3332618e4b9c867
This commit is contained in:
Michel Weststrate
2019-11-13 08:34:45 -08:00
committed by Facebook Github Bot
parent 677f7b5b5f
commit f2d12f1025
22 changed files with 167 additions and 169 deletions

View File

@@ -41,19 +41,16 @@ function mockPersistedState(
},
];
const imagesMap = imageSizes.reduce(
(acc, val, index) => {
acc[index] = {
imageId: String(index),
width: val.width,
height: val.height,
sizeBytes: 10,
data: 'undefined',
};
return acc;
},
{} as ImagesMap,
);
const imagesMap = imageSizes.reduce((acc, val, index) => {
acc[index] = {
imageId: String(index),
width: val.width,
height: val.height,
sizeBytes: 10,
data: 'undefined',
};
return acc;
}, {} as ImagesMap);
return {
surfaceList: new Set(),
@@ -233,19 +230,16 @@ test('the metric reducer with the multiple events', () => {
height: 300,
},
];
const imagesMap = imageSizes.reduce(
(acc, val, index) => {
acc[index] = {
imageId: String(index),
width: val.width,
height: val.height,
sizeBytes: 10,
data: 'undefined',
};
return acc;
},
{} as ImagesMap,
);
const imagesMap = imageSizes.reduce((acc, val, index) => {
acc[index] = {
imageId: String(index),
width: val.width,
height: val.height,
sizeBytes: 10,
data: 'undefined',
};
return acc;
}, {} as ImagesMap);
const persistedState = {
surfaceList: new Set<string>(),
images: [],

View File

@@ -110,7 +110,6 @@ export default class FlipperImagesPlugin extends FlipperPlugin<
if (!store) {
return defaultPromise;
}
const selectedDevice = store.getState().connections.selectedDevice;
return Promise.all([
callClient('listImages'),
callClient('getAllImageEventsInfo'),
@@ -244,7 +243,7 @@ export default class FlipperImagesPlugin extends FlipperPlugin<
}: PersistedState): Array<Notification> =>
closeableReferenceLeaks
.filter(_ => isLeakTrackingEnabled)
.map((event: AndroidCloseableReferenceLeakEvent, index) => ({
.map((event: AndroidCloseableReferenceLeakEvent) => ({
id: event.identityHashCode,
title: `Leaked CloseableReference: ${event.className}`,
message: (

View File

@@ -19,7 +19,6 @@ import {DeviceLogEntry} from '../../devices/BaseDevice';
import {
Text,
ManagedTable,
ManagedTableClass,
Button,
colors,

View File

@@ -53,7 +53,7 @@ export default class extends FlipperPlugin<State, any, PersistedState> {
state = {
shouldShowSaveBookmarkDialog: false,
saveBookmarkURI: null as (string | null),
saveBookmarkURI: null as string | null,
shouldShowURIErrorDialog: false,
requiredParameters: [],
};

View File

@@ -9,15 +9,7 @@
import type {SectionComponentHierarchy} from './Models';
import {
Button,
Glyph,
PureComponent,
styled,
Toolbar,
Spacer,
colors,
} from 'flipper';
import {Glyph, PureComponent, styled, Toolbar, Spacer, colors} from 'flipper';
import {Tree} from 'react-d3-tree';
import {Fragment} from 'react';