diff --git a/.eslintignore b/.eslintignore index f2f968172..0de03a8e6 100644 --- a/.eslintignore +++ b/.eslintignore @@ -7,3 +7,4 @@ flow-typed lib !.eslintrc.js dist +website/build diff --git a/headless/index.tsx b/headless/index.tsx index 91a761336..e2b56a9f8 100644 --- a/headless/index.tsx +++ b/headless/index.tsx @@ -274,9 +274,9 @@ async function startFlipper(userArguments: UserArguments) { ); const logger = initLogger(store, {isHeadless: true}); - const earlyExitClosures: Array< - (userArguments: UserArguments) => Promise - > = [ + const earlyExitClosures: Array<( + userArguments: UserArguments, + ) => Promise> = [ async (userArguments: UserArguments) => { if (userArguments.listDevices) { const devices = await listDevices(store); @@ -298,9 +298,10 @@ async function startFlipper(userArguments: UserArguments) { const cleanupDispatchers = dispatcher(store, logger); - const storeModifyingClosures: Array< - (userArguments: UserArguments, store: Store) => Promise - > = [ + const storeModifyingClosures: Array<( + userArguments: UserArguments, + store: Store, + ) => Promise> = [ async (userArguments: UserArguments, store: Store) => { const {device: selectedDeviceID} = userArguments; if (selectedDeviceID) { @@ -346,9 +347,10 @@ async function startFlipper(userArguments: UserArguments) { }, ]; - const exitActionClosures: Array< - (userArguments: UserArguments, store: Store) => Promise - > = [ + const exitActionClosures: Array<( + userArguments: UserArguments, + store: Store, + ) => Promise> = [ async (userArguments: UserArguments, store: Store) => { const {listPlugins} = userArguments; if (listPlugins) { diff --git a/src/__tests__/createTablePlugin.node.tsx b/src/__tests__/createTablePlugin.node.tsx index f133f7706..af24de800 100644 --- a/src/__tests__/createTablePlugin.node.tsx +++ b/src/__tests__/createTablePlugin.node.tsx @@ -66,7 +66,10 @@ test('persistedStateReducer is adding data', () => { const tablePlugin = createTablePlugin({...PROPS, method}); const id = '1'; - const {rows, datas} = tablePlugin.persistedStateReducer( + const { + rows, + datas, + } = tablePlugin.persistedStateReducer( tablePlugin.defaultPersistedState, method, {id}, diff --git a/src/chrome/ExportDataPluginSheet.tsx b/src/chrome/ExportDataPluginSheet.tsx index 906e0eb12..c9162c99f 100644 --- a/src/chrome/ExportDataPluginSheet.tsx +++ b/src/chrome/ExportDataPluginSheet.tsx @@ -81,18 +81,15 @@ class ExportDataPluginSheet extends Component { selectedElements={getActivePersistentPlugins( pluginStates, plugins, - ).reduce( - (acc, plugin) => { - if ( - plugins.selectedPlugins.length <= 0 || - plugins.selectedPlugins.includes(plugin) - ) { - acc.add(plugin); - } - return acc; - }, - new Set([]) as Set, - )} + ).reduce((acc, plugin) => { + if ( + plugins.selectedPlugins.length <= 0 || + plugins.selectedPlugins.includes(plugin) + ) { + acc.add(plugin); + } + return acc; + }, new Set([]) as Set)} onHide={onHide} /> ); diff --git a/src/chrome/MainSidebar.tsx b/src/chrome/MainSidebar.tsx index 10c5290a3..f28ffce0d 100644 --- a/src/chrome/MainSidebar.tsx +++ b/src/chrome/MainSidebar.tsx @@ -47,7 +47,7 @@ import {BackgroundColorProperty} from 'csstype'; import {StyledOtherComponent} from 'create-emotion-styled'; import SupportRequestFormManager from '../fb-stubs/SupportRequestFormManager'; -type FlipperPlugins = (typeof FlipperPlugin)[]; +type FlipperPlugins = typeof FlipperPlugin[]; type PluginsByCategory = [string, FlipperPlugins][]; const ListItem = styled('div')(({active}: {active?: boolean}) => ({ diff --git a/src/dispatcher/__tests__/plugins.electron.js b/src/dispatcher/__tests__/plugins.electron.js index de96ec02f..570eace2b 100644 --- a/src/dispatcher/__tests__/plugins.electron.js +++ b/src/dispatcher/__tests__/plugins.electron.js @@ -108,7 +108,10 @@ test('checkGK for failing plugin', () => { }); test('requirePlugin returns null for invalid requires', () => { - const plugin = requirePlugin([], require)({ + const plugin = requirePlugin( + [], + require, + )({ name: 'pluginID', out: 'this/path/does not/exist', }); @@ -119,7 +122,10 @@ test('requirePlugin returns null for invalid requires', () => { test('requirePlugin loads plugin', () => { const name = 'pluginID'; const homepage = 'https://fb.workplace.com/groups/flippersupport/'; - const plugin = requirePlugin([], require)({ + const plugin = requirePlugin( + [], + require, + )({ name, homepage, out: path.join(__dirname, 'TestPlugin.js'), diff --git a/src/dispatcher/androidDevice.tsx b/src/dispatcher/androidDevice.tsx index 6602fc116..3d98786c2 100644 --- a/src/dispatcher/androidDevice.tsx +++ b/src/dispatcher/androidDevice.tsx @@ -115,9 +115,7 @@ export default (store: Store, logger: Logger) => { if (err.message === 'Connection closed') { // adb server has shutdown, remove all android devices const {connections} = store.getState(); - const deviceIDsToRemove: Array< - string - > = connections.devices + const deviceIDsToRemove: Array = connections.devices .filter( (device: BaseDevice) => device instanceof AndroidDevice, ) diff --git a/src/index.tsx b/src/index.tsx index b91a9aa5d..2ce55d20d 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -24,9 +24,7 @@ export {PluginClient, Props} from './plugin'; export {default as Client} from './Client'; export {MetricType} from './utils/exportMetrics'; export {clipboard} from 'electron'; -export { - default as SupportRequestFormManager, -} from './fb-stubs/SupportRequestFormManager'; +export {default as SupportRequestFormManager} from './fb-stubs/SupportRequestFormManager'; export {default as constants} from './fb-stubs/constants'; export {connect} from 'react-redux'; export {selectPlugin, StaticView} from './reducers/connections'; @@ -35,9 +33,7 @@ export {getPluginKey, getPersistedState} from './utils/pluginUtils'; export {Idler} from './utils/Idler'; export {Store, MiddlewareAPI} from './reducers/index'; export {default as BaseDevice} from './devices/BaseDevice'; -export { - default as SidebarExtensions, -} from './fb-stubs/LayoutInspectorSidebarExtensions'; +export {default as SidebarExtensions} from './fb-stubs/LayoutInspectorSidebarExtensions'; export { DeviceLogListener, DeviceLogEntry, @@ -55,9 +51,7 @@ export {default as KaiOSDevice} from './devices/KaiOSDevice'; export {OS} from './devices/BaseDevice'; export {default as Button} from './ui/components/Button'; export {default as ToggleButton} from './ui/components/ToggleSwitch'; -export { - default as ButtonNavigationGroup, -} from './ui/components/ButtonNavigationGroup'; +export {default as ButtonNavigationGroup} from './ui/components/ButtonNavigationGroup'; export {default as ButtonGroup} from './ui/components/ButtonGroup'; export {default as ButtonGroupChain} from './ui/components/ButtonGroupChain'; export {colors, darkColors, brandColors} from './ui/components/colors'; @@ -90,15 +84,9 @@ export { DataValueExtractor, DataInspectorExpanded, } from './ui/components/data-inspector/DataInspector'; -export { - default as DataInspector, -} from './ui/components/data-inspector/DataInspector'; -export { - default as ManagedDataInspector, -} from './ui/components/data-inspector/ManagedDataInspector'; -export { - default as DataDescription, -} from './ui/components/data-inspector/DataDescription'; +export {default as DataInspector} from './ui/components/data-inspector/DataInspector'; +export {default as ManagedDataInspector} from './ui/components/data-inspector/ManagedDataInspector'; +export {default as DataDescription} from './ui/components/data-inspector/DataDescription'; export {default as Tabs} from './ui/components/Tabs'; export {default as Tab} from './ui/components/Tab'; export {default as Input} from './ui/components/Input'; @@ -114,9 +102,7 @@ export {default as Interactive} from './ui/components/Interactive'; export {default as Orderable} from './ui/components/Orderable'; export {default as VirtualList} from './ui/components/VirtualList'; export {Component, PureComponent} from 'react'; -export { - default as ContextMenuProvider, -} from './ui/components/ContextMenuProvider'; +export {default as ContextMenuProvider} from './ui/components/ContextMenuProvider'; export {default as ContextMenu} from './ui/components/ContextMenu'; export {FileListFile, FileListFiles} from './ui/components/FileList'; export {default as FileList} from './ui/components/FileList'; @@ -162,12 +148,8 @@ export { SearchableProps, default as Searchable, } from './ui/components/searchable/Searchable'; -export { - default as SearchableTable, -} from './ui/components/searchable/SearchableTable'; -export { - default as SearchableTable_immutable, -} from './ui/components/searchable/SearchableTable_immutable'; +export {default as SearchableTable} from './ui/components/searchable/SearchableTable'; +export {default as SearchableTable_immutable} from './ui/components/searchable/SearchableTable_immutable'; export { ElementID, ElementData, @@ -176,12 +158,8 @@ export { ElementSearchResultSet, } from './ui/components/elements-inspector/ElementsInspector'; export {Elements} from './ui/components/elements-inspector/elements'; -export { - ContextMenuExtension, -} from './ui/components/elements-inspector/elements'; -export { - default as ElementsInspector, -} from './ui/components/elements-inspector/ElementsInspector'; +export {ContextMenuExtension} from './ui/components/elements-inspector/elements'; +export {default as ElementsInspector} from './ui/components/elements-inspector/ElementsInspector'; export {InspectorSidebar} from './ui/components/elements-inspector/sidebar'; export {Console} from './ui/components/console'; export {default as Sheet} from './ui/components/Sheet'; diff --git a/src/plugin.tsx b/src/plugin.tsx index d2939662c..dcc4e442d 100644 --- a/src/plugin.tsx +++ b/src/plugin.tsx @@ -82,12 +82,10 @@ export abstract class FlipperBasePlugin< static icon: string | null = null; static gatekeeper: string | null = null; static entry: string | null = null; - static bugs: - | ({ - email?: string; - url?: string; - }) - | null = null; + static bugs: { + email?: string; + url?: string; + } | null = null; static keyboardActions: KeyboardActions | null; static screenshot: string | null; static defaultPersistedState: any; diff --git a/src/plugins/fresco/__tests__/index.node.tsx b/src/plugins/fresco/__tests__/index.node.tsx index ca52fd889..d6755ac3b 100644 --- a/src/plugins/fresco/__tests__/index.node.tsx +++ b/src/plugins/fresco/__tests__/index.node.tsx @@ -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(), images: [], diff --git a/src/plugins/fresco/index.tsx b/src/plugins/fresco/index.tsx index 3cbc83618..ec61f199f 100644 --- a/src/plugins/fresco/index.tsx +++ b/src/plugins/fresco/index.tsx @@ -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 => closeableReferenceLeaks .filter(_ => isLeakTrackingEnabled) - .map((event: AndroidCloseableReferenceLeakEvent, index) => ({ + .map((event: AndroidCloseableReferenceLeakEvent) => ({ id: event.identityHashCode, title: `Leaked CloseableReference: ${event.className}`, message: ( diff --git a/src/plugins/logs/index.tsx b/src/plugins/logs/index.tsx index f6b089e73..afafe17cb 100644 --- a/src/plugins/logs/index.tsx +++ b/src/plugins/logs/index.tsx @@ -19,7 +19,6 @@ import {DeviceLogEntry} from '../../devices/BaseDevice'; import { Text, - ManagedTable, ManagedTableClass, Button, colors, diff --git a/src/plugins/navigation/index.tsx b/src/plugins/navigation/index.tsx index 504351093..f75e998ce 100644 --- a/src/plugins/navigation/index.tsx +++ b/src/plugins/navigation/index.tsx @@ -53,7 +53,7 @@ export default class extends FlipperPlugin { state = { shouldShowSaveBookmarkDialog: false, - saveBookmarkURI: null as (string | null), + saveBookmarkURI: null as string | null, shouldShowURIErrorDialog: false, requiredParameters: [], }; diff --git a/src/plugins/sections/Tree.js b/src/plugins/sections/Tree.js index 7ae2aab01..9ea17e7ab 100644 --- a/src/plugins/sections/Tree.js +++ b/src/plugins/sections/Tree.js @@ -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'; diff --git a/src/reducers/__tests__/plugins.node.tsx b/src/reducers/__tests__/plugins.node.tsx index b5d9b46c2..16ebd6a45 100644 --- a/src/reducers/__tests__/plugins.node.tsx +++ b/src/reducers/__tests__/plugins.node.tsx @@ -12,12 +12,7 @@ import { registerPlugins, addGatekeepedPlugins, } from '../plugins'; -import { - FlipperBasePlugin, - FlipperPlugin, - FlipperDevicePlugin, - BaseAction, -} from '../../plugin'; +import {FlipperPlugin, FlipperDevicePlugin, BaseAction} from '../../plugin'; const testPlugin = class extends FlipperPlugin { static id = 'TestPlugin'; diff --git a/src/ui/components/data-inspector/DataInspector.tsx b/src/ui/components/data-inspector/DataInspector.tsx index d49bdc3a0..4b9cf8cfb 100644 --- a/src/ui/components/data-inspector/DataInspector.tsx +++ b/src/ui/components/data-inspector/DataInspector.tsx @@ -260,7 +260,10 @@ const diffMetadataExtractor: DiffMetadataExtractor = ( // Check if there's a difference between the original value and // the value from the diff prop // The property name still exists, but the values may be different. - return [{data: val, status: 'added'}, {data: diffVal, status: 'removed'}]; + return [ + {data: val, status: 'added'}, + {data: diffVal, status: 'removed'}, + ]; } return Object.prototype.hasOwnProperty.call(data, key) ? [{data: val}] : []; diff --git a/src/ui/components/searchable/FilterToken.tsx b/src/ui/components/searchable/FilterToken.tsx index 84aa16aad..05e4697a2 100644 --- a/src/ui/components/searchable/FilterToken.tsx +++ b/src/ui/components/searchable/FilterToken.tsx @@ -105,8 +105,8 @@ export default class FilterToken extends PureComponent { onMouseDown = () => { if ( this.props.filter.type !== 'enum' || - (this.props.filter.persistent == null || - this.props.filter.persistent === false) + this.props.filter.persistent == null || + this.props.filter.persistent === false ) { this.props.onFocus(this.props.index); } diff --git a/src/ui/index.tsx b/src/ui/index.tsx index c5daf4551..53f7a3d49 100644 --- a/src/ui/index.tsx +++ b/src/ui/index.tsx @@ -10,9 +10,7 @@ export {default as styled} from 'react-emotion'; export {default as Button} from './components/Button'; export {default as ToggleButton} from './components/ToggleSwitch'; -export { - default as ButtonNavigationGroup, -} from './components/ButtonNavigationGroup'; +export {default as ButtonNavigationGroup} from './components/ButtonNavigationGroup'; export {default as ButtonGroup} from './components/ButtonGroup'; export {default as ButtonGroupChain} from './components/ButtonGroupChain'; @@ -39,12 +37,8 @@ export { } from './components/table/types'; export {default as ManagedTable} from './components/table/ManagedTable'; export {ManagedTableProps} from './components/table/ManagedTable'; -export { - default as ManagedTable_immutable, -} from './components/table/ManagedTable_immutable'; -export { - ManagedTableProps_immutable, -} from './components/table/ManagedTable_immutable'; +export {default as ManagedTable_immutable} from './components/table/ManagedTable_immutable'; +export {ManagedTableProps_immutable} from './components/table/ManagedTable_immutable'; export {Value} from './components/table/TypeBasedValueRenderer'; export {renderValue} from './components/table/TypeBasedValueRenderer'; @@ -53,15 +47,9 @@ export { DataValueExtractor, DataInspectorExpanded, } from './components/data-inspector/DataInspector'; -export { - default as DataInspector, -} from './components/data-inspector/DataInspector'; -export { - default as ManagedDataInspector, -} from './components/data-inspector/ManagedDataInspector'; -export { - default as DataDescription, -} from './components/data-inspector/DataDescription'; +export {default as DataInspector} from './components/data-inspector/DataInspector'; +export {default as ManagedDataInspector} from './components/data-inspector/ManagedDataInspector'; +export {default as DataDescription} from './components/data-inspector/DataDescription'; // tabs export {default as Tabs} from './components/Tabs'; @@ -151,12 +139,8 @@ export { SearchIcon, default as Searchable, } from './components/searchable/Searchable'; -export { - default as SearchableTable, -} from './components/searchable/SearchableTable'; -export { - default as SearchableTable_immutable, -} from './components/searchable/SearchableTable_immutable'; +export {default as SearchableTable} from './components/searchable/SearchableTable'; +export {default as SearchableTable_immutable} from './components/searchable/SearchableTable_immutable'; export {SearchableProps} from './components/searchable/Searchable'; export { @@ -168,9 +152,7 @@ export { } from './components/elements-inspector/ElementsInspector'; export {Elements} from './components/elements-inspector/elements'; export {ContextMenuExtension} from './components/elements-inspector/elements'; -export { - default as ElementsInspector, -} from './components/elements-inspector/ElementsInspector'; +export {default as ElementsInspector} from './components/elements-inspector/ElementsInspector'; export {InspectorSidebar} from './components/elements-inspector/sidebar'; export {Console} from './components/console'; diff --git a/src/utils/CertificateProvider.tsx b/src/utils/CertificateProvider.tsx index 31773ef86..02d66c629 100644 --- a/src/utils/CertificateProvider.tsx +++ b/src/utils/CertificateProvider.tsx @@ -203,15 +203,18 @@ export default class CertificateProvider { const deviceIdPromise = appNamePromise.then(app => this.getTargetAndroidDeviceId(app, destination, csr), ); - return Promise.all([deviceIdPromise, appNamePromise, this.adb]).then( - ([deviceId, appName, adbClient]) => - androidUtil.push( - adbClient, - deviceId, - appName, - destination + filename, - contents, - ), + return Promise.all([ + deviceIdPromise, + appNamePromise, + this.adb, + ]).then(([deviceId, appName, adbClient]) => + androidUtil.push( + adbClient, + deviceId, + appName, + destination + filename, + contents, + ), ); } if (os === 'iOS' || os === 'windows' || os == 'MacOS') { diff --git a/src/utils/__tests__/serialization.node.js b/src/utils/__tests__/serialization.node.js index 15d125804..778946ebe 100644 --- a/src/utils/__tests__/serialization.node.js +++ b/src/utils/__tests__/serialization.node.js @@ -65,11 +65,17 @@ test('test makeObjectSerializable and deserializeObject function for nested obje }); test('test makeObjectSerializable and deserializeObject function for Map and Set with no nesting', async () => { - const map = new Map([['k1', 'v1'], ['k2', 'v2']]); + const map = new Map([ + ['k1', 'v1'], + ['k2', 'v2'], + ]); const output = await makeObjectSerializable(map); const expected = { __flipper_object_type__: 'Map', - data: [['k1', 'v1'], ['k2', 'v2']], + data: [ + ['k1', 'v1'], + ['k2', 'v2'], + ], }; expect(output).toEqual(expected); expect(deserializeObject(output)).toEqual(map); @@ -92,7 +98,10 @@ test('test makeObjectSerializable and deserializeObject function for Map and Set const output = await makeObjectSerializable(map); const expected = { __flipper_object_type__: 'Map', - data: [[{title: 'k1'}, {title: 'v1'}], [{title: 'k2'}, {title: 'v2'}]], + data: [ + [{title: 'k1'}, {title: 'v1'}], + [{title: 'k2'}, {title: 'v2'}], + ], }; expect(output).toEqual(expected); expect(deserializeObject(output)).toEqual(map); @@ -134,14 +143,20 @@ test('test makeObjectSerializable and deserializeObject function for custom Obje const nestedObjWithMap = new TestObject( {title: 'nestedTitle'}, - new Map([['k1', 'v1'], ['k2', 'v2']]), + new Map([ + ['k1', 'v1'], + ['k2', 'v2'], + ]), ); const nestedObjWithMapOutput = await makeObjectSerializable(nestedObjWithMap); const expectedNestedObjWithMapOutput = { title: {title: 'nestedTitle'}, map: { __flipper_object_type__: 'Map', - data: [['k1', 'v1'], ['k2', 'v2']], + data: [ + ['k1', 'v1'], + ['k2', 'v2'], + ], }, set: undefined, }; @@ -150,7 +165,10 @@ test('test makeObjectSerializable and deserializeObject function for custom Obje const nestedObjWithMapSet = new TestObject( {title: 'nestedTitle'}, - new Map([['k1', 'v1'], ['k2', 'v2']]), + new Map([ + ['k1', 'v1'], + ['k2', 'v2'], + ]), new Set([ {title: '1'}, {title: '2'}, @@ -167,7 +185,10 @@ test('test makeObjectSerializable and deserializeObject function for custom Obje title: {title: 'nestedTitle'}, map: { __flipper_object_type__: 'Map', - data: [['k1', 'v1'], ['k2', 'v2']], + data: [ + ['k1', 'v1'], + ['k2', 'v2'], + ], }, set: { __flipper_object_type__: 'Set', @@ -194,28 +215,52 @@ test('test makeObjectSerializable and deserializeObject function for Array as in expect(deserializeObject(output)).toEqual(arr); const arrMap = [ - new Map([['a1', 'v1'], ['a2', 'v2']]), - new Map([['b1', 'v1'], ['b2', 'v2']]), - new Map([['c1', 'v1'], ['c2', 'v2']]), - new Map([['d1', 'v1'], ['d2', 'v2']]), + new Map([ + ['a1', 'v1'], + ['a2', 'v2'], + ]), + new Map([ + ['b1', 'v1'], + ['b2', 'v2'], + ]), + new Map([ + ['c1', 'v1'], + ['c2', 'v2'], + ]), + new Map([ + ['d1', 'v1'], + ['d2', 'v2'], + ]), ]; const expectedArr = [ { __flipper_object_type__: 'Map', - data: [['a1', 'v1'], ['a2', 'v2']], + data: [ + ['a1', 'v1'], + ['a2', 'v2'], + ], }, { __flipper_object_type__: 'Map', - data: [['b1', 'v1'], ['b2', 'v2']], + data: [ + ['b1', 'v1'], + ['b2', 'v2'], + ], }, { __flipper_object_type__: 'Map', - data: [['c1', 'v1'], ['c2', 'v2']], + data: [ + ['c1', 'v1'], + ['c2', 'v2'], + ], }, { __flipper_object_type__: 'Map', - data: [['d1', 'v1'], ['d2', 'v2']], + data: [ + ['d1', 'v1'], + ['d2', 'v2'], + ], }, ]; const outputMap = await makeObjectSerializable(arrMap); @@ -269,7 +314,10 @@ test('test makeObjectSerializable and deserializeObject function for Map of Sets test('test makeObjectSerializable and deserializeObject function for Map, Dates and Set with complex nesting', async () => { const date1 = new Date('2019-02-15'); const date2 = new Date('2019-02-16'); - const map = new Map([['k1', date1], ['k2', new Set([date2])]]); + const map = new Map([ + ['k1', date1], + ['k2', new Set([date2])], + ]); const expectedOutput = { __flipper_object_type__: 'Map', data: [ diff --git a/src/utils/androidContainerUtilityInternal.tsx b/src/utils/androidContainerUtilityInternal.tsx index 89929db9c..64436c400 100644 --- a/src/utils/androidContainerUtilityInternal.tsx +++ b/src/utils/androidContainerUtilityInternal.tsx @@ -61,7 +61,7 @@ export function _push( deviceId, app, `echo "${contents}" > '${filename}' && chmod 644 '${filename}'`, - ).then(output => undefined); + ).then(_ => undefined); } export function _pull( diff --git a/types/globals.tsx b/types/globals.tsx index 66ebf8425..d1940a6a5 100644 --- a/types/globals.tsx +++ b/types/globals.tsx @@ -24,7 +24,7 @@ declare global { __REDUX_DEVTOOLS_EXTENSION__: | undefined - | StoreEnhancerStoreCreator & StoreEnhancerStateSanitizer; + | (StoreEnhancerStoreCreator & StoreEnhancerStateSanitizer); Flipper: { init: () => void;