diff --git a/src/MenuBar.js b/src/MenuBar.js index a43120af4..55cbefccb 100644 --- a/src/MenuBar.js +++ b/src/MenuBar.js @@ -94,11 +94,10 @@ export function setupMenuBar( plugin.keyboardActions || [], ) .reduce((acc: KeyboardActions, cv) => acc.concat(cv), []) - .map( - (action: DefaultKeyboardAction | KeyboardAction) => - typeof action === 'string' - ? defaultKeyboardActions.find(a => a.action === action) - : action, + .map((action: DefaultKeyboardAction | KeyboardAction) => + typeof action === 'string' + ? defaultKeyboardActions.find(a => a.action === action) + : action, ), ); diff --git a/src/NotificationsHub.js b/src/NotificationsHub.js index 522dd6c62..5afb12e4e 100644 --- a/src/NotificationsHub.js +++ b/src/NotificationsHub.js @@ -600,26 +600,24 @@ class NotificationItem extends Component { )} - {action && - !inactive && - !isSelected && ( - - {action && ( - - Open - - )} - {this.state.reportedNotHelpful ? ( - - Hide - - ) : ( - - Not helpful - - )} - - )} + {action && !inactive && !isSelected && ( + + {action && ( + + Open + + )} + {this.state.reportedNotHelpful ? ( + + Hide + + ) : ( + + Not helpful + + )} + + )} ); } diff --git a/src/__tests__/server.device.js b/src/__tests__/server.device.js index f3c62f4c2..333ff93a8 100644 --- a/src/__tests__/server.device.js +++ b/src/__tests__/server.device.js @@ -35,38 +35,34 @@ beforeAll(() => { return server.init(); }); -test( - 'Device can connect successfully', - done => { - var testFinished = false; - var disconnectedTooEarly = false; - const registeredClients = []; - server.addListener('new-client', (client: Client) => { - // Check there is a connected device that has the same device_id as the new client - const deviceId = client.query.device_id; - expect(deviceId).toBeTruthy(); - const devices = store.getState().connections.devices; - expect(devices.map(device => device.serial)).toContain(deviceId); +test('Device can connect successfully', done => { + var testFinished = false; + var disconnectedTooEarly = false; + const registeredClients = []; + server.addListener('new-client', (client: Client) => { + // Check there is a connected device that has the same device_id as the new client + const deviceId = client.query.device_id; + expect(deviceId).toBeTruthy(); + const devices = store.getState().connections.devices; + expect(devices.map(device => device.serial)).toContain(deviceId); - // Make sure it only connects once - registeredClients.push(client); - expect(registeredClients).toHaveLength(1); + // Make sure it only connects once + registeredClients.push(client); + expect(registeredClients).toHaveLength(1); - // Make sure client stays connected for some time before passing test - setTimeout(() => { - testFinished = true; - expect(disconnectedTooEarly).toBe(false); - done(); - }, 5000); - }); - server.addListener('removed-client', (id: string) => { - if (!testFinished) { - disconnectedTooEarly = true; - } - }); - }, - 20000, -); + // Make sure client stays connected for some time before passing test + setTimeout(() => { + testFinished = true; + expect(disconnectedTooEarly).toBe(false); + done(); + }, 5000); + }); + server.addListener('removed-client', (id: string) => { + if (!testFinished) { + disconnectedTooEarly = true; + } + }); +}, 20000); afterAll(() => { return server.close(); diff --git a/src/chrome/BugReporterDialog.js b/src/chrome/BugReporterDialog.js index 43f8f894b..20ac04940 100644 --- a/src/chrome/BugReporterDialog.js +++ b/src/chrome/BugReporterDialog.js @@ -260,7 +260,8 @@ class BugReporterDialog extends Component { 'mailto:' + String(this.props.activePlugin?.bugs?.email) }> {this.props.activePlugin?.bugs?.email} - , the author/oncall of this plugin, directly + + , the author/oncall of this plugin, directly )} . diff --git a/src/chrome/PluginDebugger.js b/src/chrome/PluginDebugger.js index 491f30568..3a8cb80df 100644 --- a/src/chrome/PluginDebugger.js +++ b/src/chrome/PluginDebugger.js @@ -257,7 +257,8 @@ class PluginDebugger extends Component { known to have problems connecting to Flipper. Check out the{' '} known incompatibilities - . + + . ); } else if ( @@ -287,7 +288,8 @@ class PluginDebugger extends Component { check out our documentation about{' '} connection issues - . + + . ); diff --git a/src/chrome/TitleBar.js b/src/chrome/TitleBar.js index 0f5a09ea3..12d55a63f 100644 --- a/src/chrome/TitleBar.js +++ b/src/chrome/TitleBar.js @@ -88,7 +88,8 @@ class TitleBar extends Component { {this.props.downloadingImportData && ( -  Importing data... + +  Importing data... )} diff --git a/src/dispatcher/androidDevice.js b/src/dispatcher/androidDevice.js index cc6286d15..3f51764ce 100644 --- a/src/dispatcher/androidDevice.js +++ b/src/dispatcher/androidDevice.js @@ -90,9 +90,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/plugins/fresco/ImagesCacheOverview.js b/src/plugins/fresco/ImagesCacheOverview.js index 6ffb30c3d..69a7d9a5f 100644 --- a/src/plugins/fresco/ImagesCacheOverview.js +++ b/src/plugins/fresco/ImagesCacheOverview.js @@ -405,10 +405,9 @@ class ImageItem extends PureComponent<{ return ( - {numberOfRequests > 0 && - image != null && ( - {numberOfRequests} - )} + {numberOfRequests > 0 && image != null && ( + {numberOfRequests} + )} {image != null ? ( ) : ( diff --git a/src/plugins/fresco/ImagesSidebar.js b/src/plugins/fresco/ImagesSidebar.js index 49e4a950d..dbbb3a2fe 100644 --- a/src/plugins/fresco/ImagesSidebar.js +++ b/src/plugins/fresco/ImagesSidebar.js @@ -36,7 +36,9 @@ export default class ImagesSidebar extends Component< return (
{this.renderUri()} - {this.props.events.map(e => )} + {this.props.events.map(e => ( + + ))}
); } diff --git a/src/plugins/layout/index.js b/src/plugins/layout/index.js index fa5b01b41..fafe64504 100644 --- a/src/plugins/layout/index.js +++ b/src/plugins/layout/index.js @@ -1183,24 +1183,23 @@ class Layout extends FlipperPlugin { {outstandingSearchQuery && } - {inAXMode && - showLithoAccessibilitySettings && ( - - - {accessibilitySettingsOpen && - this.getAccessibilitySettingsPopover(forceLithoAXRender)} - - )} + {inAXMode && showLithoAccessibilitySettings && ( + + + {accessibilitySettingsOpen && + this.getAccessibilitySettingsPopover(forceLithoAXRender)} + + )} {initialised ? ( diff --git a/src/plugins/layout/layout2/index.js b/src/plugins/layout/layout2/index.js index 626bd742d..d93975171 100644 --- a/src/plugins/layout/layout2/index.js +++ b/src/plugins/layout/layout2/index.js @@ -247,12 +247,14 @@ export default class Layout extends FlipperPlugin { )} {/* TODO: Remove this when rolling out publicly */} -   + +   Version 2.0:  Provide feedback about this plugin in our  feedback group - . + + . ); diff --git a/src/reducers/connections.js b/src/reducers/connections.js index d9611a22f..8a7f2db1b 100644 --- a/src/reducers/connections.js +++ b/src/reducers/connections.js @@ -314,11 +314,10 @@ export default function reducer( return { ...state, uninitializedClients: state.uninitializedClients - .map( - c => - isEqual(c.client, payload.client) - ? {...c, deviceId: payload.deviceId} - : c, + .map(c => + isEqual(c.client, payload.client) + ? {...c, deviceId: payload.deviceId} + : c, ) .sort((a, b) => a.client.appName.localeCompare(b.client.appName)), }; @@ -337,11 +336,10 @@ export default function reducer( return { ...state, uninitializedClients: state.uninitializedClients - .map( - c => - isEqual(c.client, payload.client) - ? {...c, errorMessage: errorMessage} - : c, + .map(c => + isEqual(c.client, payload.client) + ? {...c, errorMessage: errorMessage} + : c, ) .sort((a, b) => a.client.appName.localeCompare(b.client.appName)), error: `Client setup error: ${errorMessage}`, diff --git a/src/server.js b/src/server.js index 6ce1282d9..31ca010cb 100644 --- a/src/server.js +++ b/src/server.js @@ -284,7 +284,7 @@ export default class Server extends EventEmitter { /* If a device gets disconnected without being cleaned up properly, * Flipper won't be aware until it attempts to reconnect. * When it does we need to terminate the zombie connection. - */ + */ if (this.connections.has(id)) { const connectionInfo = this.connections.get(id); connectionInfo && diff --git a/src/ui/components/elements-inspector/elements.js b/src/ui/components/elements-inspector/elements.js index 4015522e6..2a6906a57 100644 --- a/src/ui/components/elements-inspector/elements.js +++ b/src/ui/components/elements-inspector/elements.js @@ -168,8 +168,7 @@ class ElementsRowAttribute extends PureComponent<{ const {name, value, matchingSearchQuery, selected} = this.props; return ( - {name} - = + {name}= ; diff --git a/src/utils/exportData.js b/src/utils/exportData.js index 55c003306..034b8fda5 100644 --- a/src/utils/exportData.js +++ b/src/utils/exportData.js @@ -74,8 +74,8 @@ export function processNotificationStates( devicePlugins: Map>>, ): Array { let activeNotifications = allActiveNotifications.filter(notif => { - const filteredClients = clients.filter( - client => (notif.client ? client.id.includes(notif.client) : false), + const filteredClients = clients.filter(client => + notif.client ? client.id.includes(notif.client) : false, ); return ( filteredClients.length > 0 ||