Upgrading flow and fixing lint errors

Summary:
Upgrading to flow 0.91, fixing a bunch of `$FloxFixMe`s that were introduced by upgrading to 0.86.
Also fixing some linting issues.

Reviewed By: priteshrnandgaonkar

Differential Revision: D13900794

fbshipit-source-id: 5d0a1b62371f3b5d34b909bae0876583acb6f977
This commit is contained in:
Pascal Hartig
2019-02-01 06:42:40 -08:00
committed by Facebook Github Bot
parent 88cc299811
commit 09a93cd9e6
30 changed files with 477 additions and 338 deletions

View File

@@ -38,8 +38,19 @@ const SidebarContainer = styled(FlexRow)({
overflow: 'scroll',
});
type Props = {
/*
pluginState: pluginStates[pluginKey],
activePlugin,
target,
deepLinkPayload,
pluginKey,
*/
type OwnProps = {|
logger: LogManager,
|};
type Props = {|
...OwnProps,
pluginState: Object,
activePlugin: ?Class<FlipperPlugin<> | FlipperDevicePlugin<>>,
target: Client | BaseDevice | null,
@@ -55,7 +66,7 @@ type Props = {
pluginKey: string,
state: Object,
}) => void,
};
|};
class PluginContainer extends PureComponent<Props> {
plugin: ?FlipperPlugin<> | FlipperDevicePlugin<>;
@@ -132,11 +143,7 @@ class PluginContainer extends PureComponent<Props> {
}
}
/* $FlowFixMe(>=0.86.0) This
* comment suppresses an error found when Flow v0.86 was
* deployed. To see the error, delete this comment and
* run Flow. */
export default connect(
export default connect<Props, OwnProps, _, _, _, _>(
({
application: {rightSidebarVisible, rightSidebarAvailable},
connections: {
@@ -182,6 +189,7 @@ export default connect(
pluginKey,
};
},
// $FlowFixMe
{
setPluginState,
selectPlugin,