prettier 2

Summary:
Quick notes:

- This looks worse than it is. It adds mandatory parentheses to single argument lambdas. Lots of outrage on Twitter about it, personally I'm {emoji:1f937_200d_2642} about it.
- Space before function, e.g. `a = function ()` is now enforced. I like this because both were fine before.
- I added `eslint-config-prettier` to the config because otherwise a ton of rules conflict with eslint itself.

Close https://github.com/facebook/flipper/pull/915

Reviewed By: jknoxville

Differential Revision: D20594929

fbshipit-source-id: ca1c65376b90e009550dd6d1f4e0831d32cbff03
This commit is contained in:
Pascal Hartig
2020-03-24 09:34:39 -07:00
committed by Facebook GitHub Bot
parent d9d3be33b4
commit fc9ed65762
204 changed files with 877 additions and 864 deletions

View File

@@ -198,11 +198,11 @@ class PluginContainer extends PureComponent<Props, State> {
activePlugin,
pluginKey,
this.store,
progress => {
(progress) => {
this.setState({progress});
},
this.idler,
).then(completed => {
).then((completed) => {
const duration = Date.now() - start;
this.props.logger.track(
'duration',
@@ -345,7 +345,7 @@ class PluginContainer extends PureComponent<Props, State> {
}
: pluginState,
setStaticView: (payload: StaticView) => this.props.setStaticView(payload),
setPersistedState: state => setPluginState({pluginKey, state}),
setPersistedState: (state) => setPluginState({pluginKey, state}),
target,
deepLinkPayload: this.props.deepLinkPayload,
selectPlugin: (pluginID: string, deepLinkPayload: string | null) => {
@@ -353,7 +353,7 @@ class PluginContainer extends PureComponent<Props, State> {
// check if plugin will be available
if (
target instanceof Client &&
target.plugins.some(p => p === pluginID)
target.plugins.some((p) => p === pluginID)
) {
this.props.selectPlugin({selectedPlugin: pluginID, deepLinkPayload});
return true;
@@ -371,8 +371,9 @@ class PluginContainer extends PureComponent<Props, State> {
<React.Fragment>
<Container key="plugin">
<ErrorBoundary
heading={`Plugin "${activePlugin.title ||
'Unknown'}" encountered an error during render`}>
heading={`Plugin "${
activePlugin.title || 'Unknown'
}" encountered an error during render`}>
{React.createElement(activePlugin, props)}
</ErrorBoundary>
</Container>