Run prettier fix

Summary: Should also fix the build.

Reviewed By: jknoxville

Differential Revision: D14477777

fbshipit-source-id: 01fcfb2321c9b7a12acdf079473d91b6805d4dda
This commit is contained in:
Pascal Hartig
2019-03-15 05:09:43 -07:00
committed by Facebook Github Bot
parent b354a82066
commit 3141b954bf
16 changed files with 97 additions and 103 deletions

View File

@@ -94,8 +94,7 @@ export function setupMenuBar(
plugin.keyboardActions || [], plugin.keyboardActions || [],
) )
.reduce((acc: KeyboardActions, cv) => acc.concat(cv), []) .reduce((acc: KeyboardActions, cv) => acc.concat(cv), [])
.map( .map((action: DefaultKeyboardAction | KeyboardAction) =>
(action: DefaultKeyboardAction | KeyboardAction) =>
typeof action === 'string' typeof action === 'string'
? defaultKeyboardActions.find(a => a.action === action) ? defaultKeyboardActions.find(a => a.action === action)
: action, : action,

View File

@@ -600,9 +600,7 @@ class NotificationItem extends Component<ItemProps, ItemState> {
</Actions> </Actions>
)} )}
</NotificationContent> </NotificationContent>
{action && {action && !inactive && !isSelected && (
!inactive &&
!isSelected && (
<FlexColumn style={{alignSelf: 'center'}}> <FlexColumn style={{alignSelf: 'center'}}>
{action && ( {action && (
<NotificationButton compact onClick={this.openDeeplink}> <NotificationButton compact onClick={this.openDeeplink}>

View File

@@ -35,9 +35,7 @@ beforeAll(() => {
return server.init(); return server.init();
}); });
test( test('Device can connect successfully', done => {
'Device can connect successfully',
done => {
var testFinished = false; var testFinished = false;
var disconnectedTooEarly = false; var disconnectedTooEarly = false;
const registeredClients = []; const registeredClients = [];
@@ -64,9 +62,7 @@ test(
disconnectedTooEarly = true; disconnectedTooEarly = true;
} }
}); });
}, }, 20000);
20000,
);
afterAll(() => { afterAll(() => {
return server.close(); return server.close();

View File

@@ -260,7 +260,8 @@ class BugReporterDialog extends Component<Props, State> {
'mailto:' + String(this.props.activePlugin?.bugs?.email) 'mailto:' + String(this.props.activePlugin?.bugs?.email)
}> }>
{this.props.activePlugin?.bugs?.email} {this.props.activePlugin?.bugs?.email}
</Link>, the author/oncall of this plugin, directly </Link>
, the author/oncall of this plugin, directly
</span> </span>
)} )}
. .

View File

@@ -257,7 +257,8 @@ class PluginDebugger extends Component<Props> {
known to have problems connecting to Flipper. Check out the{' '} known to have problems connecting to Flipper. Check out the{' '}
<Link href="https://fbflipper.com/docs/troubleshooting.html#known-incompatibilities"> <Link href="https://fbflipper.com/docs/troubleshooting.html#known-incompatibilities">
known incompatibilities known incompatibilities
</Link>. </Link>
.
</InfoText> </InfoText>
); );
} else if ( } else if (
@@ -287,7 +288,8 @@ class PluginDebugger extends Component<Props> {
check out our documentation about{' '} check out our documentation about{' '}
<Link href="https://fbflipper.com/docs/troubleshooting.html#connection-issues"> <Link href="https://fbflipper.com/docs/troubleshooting.html#connection-issues">
connection issues connection issues
</Link>. </Link>
.
</InfoText> </InfoText>
</Fragment> </Fragment>
); );

View File

@@ -88,7 +88,8 @@ class TitleBar extends Component<Props> {
<ScreenCaptureButtons /> <ScreenCaptureButtons />
{this.props.downloadingImportData && ( {this.props.downloadingImportData && (
<Importing> <Importing>
<LoadingIndicator size={16} />&nbsp;Importing data... <LoadingIndicator size={16} />
&nbsp;Importing data...
</Importing> </Importing>
)} )}
<Spacer /> <Spacer />

View File

@@ -90,9 +90,7 @@ export default (store: Store, logger: Logger) => {
if (err.message === 'Connection closed') { if (err.message === 'Connection closed') {
// adb server has shutdown, remove all android devices // adb server has shutdown, remove all android devices
const {connections} = store.getState(); const {connections} = store.getState();
const deviceIDsToRemove: Array< const deviceIDsToRemove: Array<string> = connections.devices
string,
> = connections.devices
.filter( .filter(
(device: BaseDevice) => device instanceof AndroidDevice, (device: BaseDevice) => device instanceof AndroidDevice,
) )

View File

@@ -405,8 +405,7 @@ class ImageItem extends PureComponent<{
return ( return (
<ImageItem.Container onClick={this.onClick} size={size}> <ImageItem.Container onClick={this.onClick} size={size}>
{numberOfRequests > 0 && {numberOfRequests > 0 && image != null && (
image != null && (
<ImageItem.Events>{numberOfRequests}</ImageItem.Events> <ImageItem.Events>{numberOfRequests}</ImageItem.Events>
)} )}
{image != null ? ( {image != null ? (

View File

@@ -36,7 +36,9 @@ export default class ImagesSidebar extends Component<
return ( return (
<div> <div>
{this.renderUri()} {this.renderUri()}
{this.props.events.map(e => <EventDetails key={e.eventId} event={e} />)} {this.props.events.map(e => (
<EventDetails key={e.eventId} event={e} />
))}
</div> </div>
); );
} }

View File

@@ -1183,8 +1183,7 @@ class Layout extends FlipperPlugin<InspectorState> {
<LayoutSearchInput onSubmit={this.search.bind(this)} /> <LayoutSearchInput onSubmit={this.search.bind(this)} />
{outstandingSearchQuery && <LoadingSpinner size={16} />} {outstandingSearchQuery && <LoadingSpinner size={16} />}
</SearchBox> </SearchBox>
{inAXMode && {inAXMode && showLithoAccessibilitySettings && (
showLithoAccessibilitySettings && (
<SearchIconContainer <SearchIconContainer
onClick={this.onOpenAccessibilitySettings} onClick={this.onOpenAccessibilitySettings}
role="button"> role="button">

View File

@@ -247,12 +247,14 @@ export default class Layout extends FlipperPlugin<State, void, PersistedState> {
)} )}
{/* TODO: Remove this when rolling out publicly */} {/* TODO: Remove this when rolling out publicly */}
<BetaBar position="bottom" compact> <BetaBar position="bottom" compact>
<Glyph name="beta" color="#8157C7" />&nbsp; <Glyph name="beta" color="#8157C7" />
&nbsp;
<strong>Version 2.0:</strong>&nbsp; Provide feedback about this plugin <strong>Version 2.0:</strong>&nbsp; Provide feedback about this plugin
in our&nbsp; in our&nbsp;
<Link href="https://fb.workplace.com/groups/246035322947653/"> <Link href="https://fb.workplace.com/groups/246035322947653/">
feedback group feedback group
</Link>. </Link>
.
</BetaBar> </BetaBar>
</FlexColumn> </FlexColumn>
); );

View File

@@ -314,8 +314,7 @@ export default function reducer(
return { return {
...state, ...state,
uninitializedClients: state.uninitializedClients uninitializedClients: state.uninitializedClients
.map( .map(c =>
c =>
isEqual(c.client, payload.client) isEqual(c.client, payload.client)
? {...c, deviceId: payload.deviceId} ? {...c, deviceId: payload.deviceId}
: c, : c,
@@ -337,8 +336,7 @@ export default function reducer(
return { return {
...state, ...state,
uninitializedClients: state.uninitializedClients uninitializedClients: state.uninitializedClients
.map( .map(c =>
c =>
isEqual(c.client, payload.client) isEqual(c.client, payload.client)
? {...c, errorMessage: errorMessage} ? {...c, errorMessage: errorMessage}
: c, : c,

View File

@@ -168,8 +168,7 @@ class ElementsRowAttribute extends PureComponent<{
const {name, value, matchingSearchQuery, selected} = this.props; const {name, value, matchingSearchQuery, selected} = this.props;
return ( return (
<ElementsRowAttributeContainer code={true}> <ElementsRowAttributeContainer code={true}>
<ElementsRowAttributeKey>{name}</ElementsRowAttributeKey> <ElementsRowAttributeKey>{name}</ElementsRowAttributeKey>=
=
<ElementsRowAttributeValue> <ElementsRowAttributeValue>
<PartialHighlight <PartialHighlight
content={value} content={value}

View File

@@ -74,8 +74,8 @@ export function processNotificationStates(
devicePlugins: Map<string, Class<FlipperDevicePlugin<>>>, devicePlugins: Map<string, Class<FlipperDevicePlugin<>>>,
): Array<PluginNotification> { ): Array<PluginNotification> {
let activeNotifications = allActiveNotifications.filter(notif => { let activeNotifications = allActiveNotifications.filter(notif => {
const filteredClients = clients.filter( const filteredClients = clients.filter(client =>
client => (notif.client ? client.id.includes(notif.client) : false), notif.client ? client.id.includes(notif.client) : false,
); );
return ( return (
filteredClients.length > 0 || filteredClients.length > 0 ||