, State> {
abstract ['constructor']: any;
static title: string | null = null;
@@ -197,7 +197,7 @@ export abstract class FlipperBasePlugin<
export class FlipperDevicePlugin<
S,
A extends BaseAction,
- P
+ P,
> extends FlipperBasePlugin {
['constructor']: typeof FlipperPlugin;
device: BaseDevice;
@@ -226,7 +226,7 @@ export class FlipperDevicePlugin<
export class FlipperPlugin<
S,
A extends BaseAction,
- P
+ P,
> extends FlipperBasePlugin {
['constructor']: typeof FlipperPlugin;
constructor(props: Props) {
diff --git a/desktop/app/src/plugins/TableNativePlugin.tsx b/desktop/app/src/plugins/TableNativePlugin.tsx
index c4f700703..b3637ba4b 100644
--- a/desktop/app/src/plugins/TableNativePlugin.tsx
+++ b/desktop/app/src/plugins/TableNativePlugin.tsx
@@ -470,13 +470,8 @@ export default function createTableNativePlugin(id: string, title: string) {
if (!this.props.persistedState.tableMetadata) {
return 'Loading...';
}
- const {
- topToolbar,
- bottomToolbar,
- columns,
- columnSizes,
- columnOrder,
- } = this.props.persistedState.tableMetadata;
+ const {topToolbar, bottomToolbar, columns, columnSizes, columnOrder} =
+ this.props.persistedState.tableMetadata;
const {rows} = this.props.persistedState;
const topToolbarComponent = topToolbar ? renderToolbar(topToolbar) : null;
diff --git a/desktop/app/src/reducers/__tests__/sandydeviceplugins.node.tsx b/desktop/app/src/reducers/__tests__/sandydeviceplugins.node.tsx
index acb5a41ad..985a989a0 100644
--- a/desktop/app/src/reducers/__tests__/sandydeviceplugins.node.tsx
+++ b/desktop/app/src/reducers/__tests__/sandydeviceplugins.node.tsx
@@ -71,8 +71,9 @@ test('it should initialize device sandy plugins', async () => {
expect(device.sandyPluginStates.get(TestPlugin.id)).toBeInstanceOf(
_SandyDevicePluginInstance,
);
- const instanceApi: PluginApi = device.sandyPluginStates.get(TestPlugin.id)!
- .instanceApi;
+ const instanceApi: PluginApi = device.sandyPluginStates.get(
+ TestPlugin.id,
+ )!.instanceApi;
expect(instanceApi.activateStub).toBeCalledTimes(0);
selectTestPlugin(store);
diff --git a/desktop/app/src/reducers/__tests__/sandyplugins.node.tsx b/desktop/app/src/reducers/__tests__/sandyplugins.node.tsx
index d17f56c9a..b8fad9f75 100644
--- a/desktop/app/src/reducers/__tests__/sandyplugins.node.tsx
+++ b/desktop/app/src/reducers/__tests__/sandyplugins.node.tsx
@@ -85,8 +85,9 @@ test('it should initialize starred sandy plugins', async () => {
expect(client.sandyPluginStates.get(TestPlugin.id)).toBeInstanceOf(
_SandyPluginInstance,
);
- const instanceApi: PluginApi = client.sandyPluginStates.get(TestPlugin.id)!
- .instanceApi;
+ const instanceApi: PluginApi = client.sandyPluginStates.get(
+ TestPlugin.id,
+ )!.instanceApi;
expect(instanceApi.connectStub).toBeCalledTimes(0);
selectTestPlugin(store, client);
@@ -104,8 +105,9 @@ test('it should cleanup a plugin if disabled', async () => {
const {client, store} = await createMockFlipperWithPlugin(TestPlugin);
expect(TestPlugin.asPluginModule().plugin).toBeCalledTimes(1);
- const pluginInstance: PluginApi = client.sandyPluginStates.get(TestPlugin.id)!
- .instanceApi;
+ const pluginInstance: PluginApi = client.sandyPluginStates.get(
+ TestPlugin.id,
+ )!.instanceApi;
expect(pluginInstance.destroyStub).toHaveBeenCalledTimes(0);
client.initPlugin(TestPlugin.id);
expect(pluginInstance.connectStub).toHaveBeenCalledTimes(1);
@@ -210,8 +212,9 @@ test('it trigger hooks for background plugins', async () => {
const {client} = await createMockFlipperWithPlugin(TestPlugin, {
asBackgroundPlugin: true,
});
- const pluginInstance: PluginApi = client.sandyPluginStates.get(TestPlugin.id)!
- .instanceApi;
+ const pluginInstance: PluginApi = client.sandyPluginStates.get(
+ TestPlugin.id,
+ )!.instanceApi;
expect(client.isBackgroundPlugin(TestPlugin.id)).toBeTruthy();
expect(pluginInstance.destroyStub).toHaveBeenCalledTimes(0);
expect(pluginInstance.connectStub).toHaveBeenCalledTimes(1);
@@ -234,8 +237,9 @@ test('it can send messages from sandy clients', async () => {
}
},
});
- const pluginInstance: PluginApi = client.sandyPluginStates.get(TestPlugin.id)!
- .instanceApi;
+ const pluginInstance: PluginApi = client.sandyPluginStates.get(
+ TestPlugin.id,
+ )!.instanceApi;
// without rendering, non-bg plugins won't connect automatically,
client.initPlugin(TestPlugin.id);
await pluginInstance.send('test', {test: 3});
diff --git a/desktop/app/src/reducers/supportForm.tsx b/desktop/app/src/reducers/supportForm.tsx
index fe5cd6b32..fdd6e27ee 100644
--- a/desktop/app/src/reducers/supportForm.tsx
+++ b/desktop/app/src/reducers/supportForm.tsx
@@ -124,8 +124,8 @@ export class Group {
let errorMessage: string | undefined = undefined;
if (selectedApp) {
const {app} = deconstructClientId(selectedApp);
- const enabledPlugins: Array | null = store.getState().connections
- .enabledPlugins[app];
+ const enabledPlugins: Array | null =
+ store.getState().connections.enabledPlugins[app];
const unsupportedPlugins = [];
for (const requiredPlugin of this.requiredPlugins) {
const requiredPluginEnabled =
diff --git a/desktop/app/src/sandy-chrome/SandyApp.tsx b/desktop/app/src/sandy-chrome/SandyApp.tsx
index 6c5dc07f4..149960dca 100644
--- a/desktop/app/src/sandy-chrome/SandyApp.tsx
+++ b/desktop/app/src/sandy-chrome/SandyApp.tsx
@@ -61,10 +61,8 @@ export function SandyApp() {
* The logic here is to sync both, but without modifying the navigation related reducers to not break classic Flipper.
* It is possible to simplify this in the future.
*/
- const [
- toplevelSelection,
- setStoredToplevelSelection,
- ] = useState('appinspect');
+ const [toplevelSelection, setStoredToplevelSelection] =
+ useState('appinspect');
// Handle toplevel nav clicks from LeftRail
const setToplevelSelection = useCallback(
diff --git a/desktop/app/src/sandy-chrome/SetupDoctorScreen.tsx b/desktop/app/src/sandy-chrome/SetupDoctorScreen.tsx
index b33c62080..f40e1407a 100644
--- a/desktop/app/src/sandy-chrome/SetupDoctorScreen.tsx
+++ b/desktop/app/src/sandy-chrome/SetupDoctorScreen.tsx
@@ -212,9 +212,10 @@ export default function SetupDoctorScreen(props: {
const [acknowlodgeProblem, setAcknowlodgeProblem] = useState(
checkHasNewProblem(healthcheckReport.result),
);
- const hasProblem = useMemo(() => checkHasProblem(healthcheckReport.result), [
- healthcheckReport,
- ]);
+ const hasProblem = useMemo(
+ () => checkHasProblem(healthcheckReport.result),
+ [healthcheckReport],
+ );
const onCloseModal = useCallback(() => {
const hasNewProblem = checkHasNewProblem(healthcheckReport.result);
if (acknowlodgeProblem) {
diff --git a/desktop/app/src/sandy-chrome/appinspect/AppSelector.tsx b/desktop/app/src/sandy-chrome/appinspect/AppSelector.tsx
index 2bd6914a2..368691f7e 100644
--- a/desktop/app/src/sandy-chrome/appinspect/AppSelector.tsx
+++ b/desktop/app/src/sandy-chrome/appinspect/AppSelector.tsx
@@ -49,13 +49,8 @@ function getOsIcon(os?: OS) {
export function AppSelector() {
const dispatch = useDispatch();
- const {
- devices,
- selectedDevice,
- clients,
- uninitializedClients,
- selectedApp,
- } = useStore((state) => state.connections);
+ const {devices, selectedDevice, clients, uninitializedClients, selectedApp} =
+ useStore((state) => state.connections);
useValue(selectedDevice?.connected, false); // subscribe to future archived state changes
const onSelectDevice = useTrackedCallback(
diff --git a/desktop/app/src/sandy-chrome/appinspect/BookmarkSection.tsx b/desktop/app/src/sandy-chrome/appinspect/BookmarkSection.tsx
index b7dda6709..f49707270 100644
--- a/desktop/app/src/sandy-chrome/appinspect/BookmarkSection.tsx
+++ b/desktop/app/src/sandy-chrome/appinspect/BookmarkSection.tsx
@@ -46,10 +46,10 @@ function BookmarkSectionInput({navPlugin}: {navPlugin: NavigationPlugin}) {
const bookmarks = useValue(navPlugin.bookmarks);
const patterns = useValue(navPlugin.appMatchPatterns);
- const isBookmarked = useMemo(() => bookmarks.has(currentURI), [
- bookmarks,
- currentURI,
- ]);
+ const isBookmarked = useMemo(
+ () => bookmarks.has(currentURI),
+ [bookmarks, currentURI],
+ );
const autoCompleteItems = useMemoize(
navPlugin.getAutoCompleteAppMatchPatterns,
diff --git a/desktop/app/src/sandy-chrome/appinspect/PluginList.tsx b/desktop/app/src/sandy-chrome/appinspect/PluginList.tsx
index 22dd7b8e1..c2d41a266 100644
--- a/desktop/app/src/sandy-chrome/appinspect/PluginList.tsx
+++ b/desktop/app/src/sandy-chrome/appinspect/PluginList.tsx
@@ -493,33 +493,36 @@ const PluginMenu = styled(Menu)({
'.ant-menu-sub.ant-menu-inline': {
background: theme.backgroundDefault,
},
- '.ant-menu-inline .ant-menu-item, .ant-menu-inline .ant-menu-submenu-title ': {
- width: '100%', // reset to remove weird bonus pixel from ANT
- },
- '.ant-menu-submenu > .ant-menu-submenu-title, .ant-menu-sub.ant-menu-inline > .ant-menu-item': {
- borderRadius: theme.borderRadius,
- height: '32px',
- lineHeight: '24px',
- padding: `4px 8px !important`,
- '&:hover': {
- color: theme.textColorPrimary,
- background: theme.backgroundTransparentHover,
+ '.ant-menu-inline .ant-menu-item, .ant-menu-inline .ant-menu-submenu-title ':
+ {
+ width: '100%', // reset to remove weird bonus pixel from ANT
},
- '&.ant-menu-item-selected::after': {
- border: 'none',
+ '.ant-menu-submenu > .ant-menu-submenu-title, .ant-menu-sub.ant-menu-inline > .ant-menu-item':
+ {
+ borderRadius: theme.borderRadius,
+ height: '32px',
+ lineHeight: '24px',
+ padding: `4px 8px !important`,
+ '&:hover': {
+ color: theme.textColorPrimary,
+ background: theme.backgroundTransparentHover,
+ },
+ '&.ant-menu-item-selected::after': {
+ border: 'none',
+ },
+ '&.ant-menu-item-selected': {
+ color: theme.white,
+ background: theme.primaryColor,
+ border: 'none',
+ },
+ '&.ant-menu-item-selected .ant-typography': {
+ color: theme.white,
+ },
},
- '&.ant-menu-item-selected': {
- color: theme.white,
- background: theme.primaryColor,
- border: 'none',
+ '.ant-menu-submenu-inline > .ant-menu-submenu-title .ant-menu-submenu-arrow':
+ {
+ right: 8,
},
- '&.ant-menu-item-selected .ant-typography': {
- color: theme.white,
- },
- },
- '.ant-menu-submenu-inline > .ant-menu-submenu-title .ant-menu-submenu-arrow': {
- right: 8,
- },
'.ant-badge-count': {
color: theme.textColorSecondary,
// border: `1px solid ${theme.dividerColor}`,
diff --git a/desktop/app/src/server.tsx b/desktop/app/src/server.tsx
index 462720999..92f9e9375 100644
--- a/desktop/app/src/server.tsx
+++ b/desktop/app/src/server.tsx
@@ -292,16 +292,8 @@ class Server extends EventEmitter {
});
this.connectionTracker.logConnectionAttempt(clientData);
- const {
- app,
- os,
- device,
- device_id,
- sdk_version,
- csr,
- csr_path,
- medium,
- } = clientData;
+ const {app, os, device, device_id, sdk_version, csr, csr_path, medium} =
+ clientData;
const transformedMedium = transformCertificateExchangeMediumToType(medium);
if (transformedMedium === 'WWW') {
this.store.dispatch({
@@ -518,16 +510,19 @@ class Server extends EventEmitter {
// otherwise, use given device_id
const {csr_path, csr} = csrQuery;
// For iOS we do not need to confirm the device id, as it never changes unlike android.
- return (csr_path && csr && query.os != 'iOS'
- ? this.certificateProvider.extractAppNameFromCSR(csr).then((appName) => {
- return this.certificateProvider.getTargetDeviceId(
- query.os,
- appName,
- csr_path,
- csr,
- );
- })
- : Promise.resolve(query.device_id)
+ return (
+ csr_path && csr && query.os != 'iOS'
+ ? this.certificateProvider
+ .extractAppNameFromCSR(csr)
+ .then((appName) => {
+ return this.certificateProvider.getTargetDeviceId(
+ query.os,
+ appName,
+ csr_path,
+ csr,
+ );
+ })
+ : Promise.resolve(query.device_id)
).then(async (csrId) => {
query.device_id = csrId;
query.app = appNameWithUpdateHint(query);
diff --git a/desktop/app/src/ui/components/ContextMenuProvider.tsx b/desktop/app/src/ui/components/ContextMenuProvider.tsx
index 0c4e8bbdc..6f2c886e1 100644
--- a/desktop/app/src/ui/components/ContextMenuProvider.tsx
+++ b/desktop/app/src/ui/components/ContextMenuProvider.tsx
@@ -22,9 +22,8 @@ const Container = styled.div({
});
Container.displayName = 'ContextMenuProvider:Container';
-export const ContextMenuContext = createContext(
- undefined,
-);
+export const ContextMenuContext =
+ createContext(undefined);
/**
* Flipper's root is already wrapped with this component, so plugins should not
* need to use this. ContextMenu is what you probably want to use.
diff --git a/desktop/app/src/ui/components/PopoverProvider.tsx b/desktop/app/src/ui/components/PopoverProvider.tsx
index 73e74f0cd..b6d656ce4 100644
--- a/desktop/app/src/ui/components/PopoverProvider.tsx
+++ b/desktop/app/src/ui/components/PopoverProvider.tsx
@@ -63,10 +63,11 @@ const PopoverElement = (props: {
children: ReactNode;
}) => {
const ref = useRef(null);
- const [dimensions, setDimensions] = useState<{
- width: number;
- height: number;
- } | null>(null);
+ const [dimensions, setDimensions] =
+ useState<{
+ width: number;
+ height: number;
+ } | null>(null);
useEffect(() => {
if (!ref.current) {
return;
diff --git a/desktop/app/src/ui/components/Select.tsx b/desktop/app/src/ui/components/Select.tsx
index 94c56b931..3c76a527f 100644
--- a/desktop/app/src/ui/components/Select.tsx
+++ b/desktop/app/src/ui/components/Select.tsx
@@ -69,15 +69,8 @@ export default class Select extends Component<{
};
render() {
- const {
- className,
- options,
- selected,
- label,
- grow,
- disabled,
- style,
- } = this.props;
+ const {className, options, selected, label, grow, disabled, style} =
+ this.props;
let select = (
).reduce((acc, cv) => {
+ const columns = (
+ Object.keys(children[0]) as Array
+ ).reduce((acc, cv) => {
if (cv !== 'isBold') {
acc[cv] = {
value: cv,
@@ -131,9 +131,9 @@ export default class StackTrace extends Component<{
visible: Boolean(columns[key]),
}));
- const columnSizes = (Object.keys(COLUMNS) as Array<
- keyof typeof COLUMNS
- >).reduce((acc, cv: keyof typeof COLUMNS) => {
+ const columnSizes = (
+ Object.keys(COLUMNS) as Array
+ ).reduce((acc, cv: keyof typeof COLUMNS) => {
acc[cv] =
COLUMNS[cv] === 'flex'
? 'flex'
diff --git a/desktop/app/src/ui/components/searchable/Searchable.tsx b/desktop/app/src/ui/components/searchable/Searchable.tsx
index c9f4903e3..402b130c9 100644
--- a/desktop/app/src/ui/components/searchable/Searchable.tsx
+++ b/desktop/app/src/ui/components/searchable/Searchable.tsx
@@ -208,11 +208,8 @@ export default function Searchable(
const filters = new Set(
savedDefaultFilter.enum.map((filter) => filter.value),
);
- savedStateFilters[
- filterIndex
- ].value = savedDefaultFilter.value.filter((value) =>
- filters.has(value),
- );
+ savedStateFilters[filterIndex].value =
+ savedDefaultFilter.value.filter((value) => filters.has(value));
}
});
}
diff --git a/desktop/app/src/ui/components/searchable/SearchableTable.tsx b/desktop/app/src/ui/components/searchable/SearchableTable.tsx
index bdfab56bf..f1cc59370 100644
--- a/desktop/app/src/ui/components/searchable/SearchableTable.tsx
+++ b/desktop/app/src/ui/components/searchable/SearchableTable.tsx
@@ -91,14 +91,16 @@ export function rowMatchesSearchTerm(
);
}
-export const filterRowsFactory = (
- filters: Array,
- searchTerm: string,
- regexSearch: boolean,
- contentSearch: boolean,
-) => (row: TableBodyRow): boolean =>
- rowMatchesFilters(filters, row) &&
- rowMatchesSearchTerm(searchTerm, regexSearch, contentSearch, row);
+export const filterRowsFactory =
+ (
+ filters: Array,
+ searchTerm: string,
+ regexSearch: boolean,
+ contentSearch: boolean,
+ ) =>
+ (row: TableBodyRow): boolean =>
+ rowMatchesFilters(filters, row) &&
+ rowMatchesSearchTerm(searchTerm, regexSearch, contentSearch, row);
class SearchableManagedTable extends PureComponent {
static defaultProps = {
diff --git a/desktop/app/src/ui/components/table/ManagedTable.tsx b/desktop/app/src/ui/components/table/ManagedTable.tsx
index d258e7a09..3727f4209 100644
--- a/desktop/app/src/ui/components/table/ManagedTable.tsx
+++ b/desktop/app/src/ui/components/table/ManagedTable.tsx
@@ -540,8 +540,9 @@ export class ManagedTable extends React.Component<
.map((column, index) => ({
label: this.props.columns[column].value,
click: () => {
- const rowId = this.state.highlightedRows.values().next()
- .value;
+ const rowId = this.state.highlightedRows
+ .values()
+ .next().value;
rowId && this.onCopyCell(rowId, index);
},
})),
@@ -665,13 +666,8 @@ export class ManagedTable extends React.Component<
};
render() {
- const {
- columns,
- rows,
- rowLineHeight,
- hideHeader,
- horizontallyScrollable,
- } = this.props;
+ const {columns, rows, rowLineHeight, hideHeader, horizontallyScrollable} =
+ this.props;
const {columnOrder, columnSizes} = this.state;
let computedWidth = 0;
diff --git a/desktop/app/src/ui/components/table/ManagedTable_immutable.tsx b/desktop/app/src/ui/components/table/ManagedTable_immutable.tsx
index 8507b9c37..72909486a 100644
--- a/desktop/app/src/ui/components/table/ManagedTable_immutable.tsx
+++ b/desktop/app/src/ui/components/table/ManagedTable_immutable.tsx
@@ -499,8 +499,9 @@ class ManagedTable extends React.Component<
.map((column, index) => ({
label: this.props.columns[column].value,
click: () => {
- const rowId = this.state.highlightedRows.values().next()
- .value;
+ const rowId = this.state.highlightedRows
+ .values()
+ .next().value;
rowId && this.onCopyCell(rowId, index);
},
})),
@@ -632,13 +633,8 @@ class ManagedTable extends React.Component<
};
render() {
- const {
- columns,
- rows,
- rowLineHeight,
- hideHeader,
- horizontallyScrollable,
- } = this.props;
+ const {columns, rows, rowLineHeight, hideHeader, horizontallyScrollable} =
+ this.props;
const {columnOrder, columnSizes} = this.state;
let computedWidth = 0;
diff --git a/desktop/app/src/utils/CertificateProvider.tsx b/desktop/app/src/utils/CertificateProvider.tsx
index 91b226774..3b1783fe9 100644
--- a/desktop/app/src/utils/CertificateProvider.tsx
+++ b/desktop/app/src/utils/CertificateProvider.tsx
@@ -286,18 +286,15 @@ 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') {
@@ -305,9 +302,8 @@ export default class CertificateProvider {
(err) => {
if (os === 'iOS') {
// Writing directly to FS failed. It's probably a physical device.
- const relativePathInsideApp = this.getRelativePathInAppContainer(
- destination,
- );
+ const relativePathInsideApp =
+ this.getRelativePathInAppContainer(destination);
return appNamePromise
.then((appName) => {
return this.getTargetiOSDeviceId(appName, destination, csr);
diff --git a/desktop/app/src/utils/__tests__/exportData.node.tsx b/desktop/app/src/utils/__tests__/exportData.node.tsx
index abf26c04c..ed9e5b5e0 100644
--- a/desktop/app/src/utils/__tests__/exportData.node.tsx
+++ b/desktop/app/src/utils/__tests__/exportData.node.tsx
@@ -1127,12 +1127,8 @@ const sandyTestPlugin = new _SandyPluginDefinition(
);
test('Sandy plugins are exported properly', async () => {
- const {
- client,
- sendMessage,
- store,
- device,
- } = await createMockFlipperWithPlugin(sandyTestPlugin);
+ const {client, sendMessage, store, device} =
+ await createMockFlipperWithPlugin(sandyTestPlugin);
// We do select another plugin, to verify that pending message queues are indeed processed before exporting
store.dispatch(
@@ -1266,8 +1262,7 @@ test('Sandy plugins are imported properly', async () => {
const data = {
clients: [
{
- id:
- 'TestApp#Android#MockAndroidDevice#2e52cea6-94b0-4ea1-b9a8-c9135ede14ca-serial',
+ id: 'TestApp#Android#MockAndroidDevice#2e52cea6-94b0-4ea1-b9a8-c9135ede14ca-serial',
query: {
app: 'TestApp',
device: 'MockAndroidDevice',
@@ -1288,14 +1283,15 @@ test('Sandy plugins are imported properly', async () => {
fileVersion: '0.9.99',
flipperReleaseRevision: undefined,
pluginStates2: {
- 'TestApp#Android#MockAndroidDevice#2e52cea6-94b0-4ea1-b9a8-c9135ede14ca-serial': {
- TestPlugin: {
- otherState: {
- testCount: -3,
+ 'TestApp#Android#MockAndroidDevice#2e52cea6-94b0-4ea1-b9a8-c9135ede14ca-serial':
+ {
+ TestPlugin: {
+ otherState: {
+ testCount: -3,
+ },
+ counter: 3,
},
- counter: 3,
},
- },
},
store: {
activeNotifications: [],
@@ -1484,8 +1480,7 @@ test('Sandy plugin with custom import', async () => {
const data = {
clients: [
{
- id:
- 'TestApp#Android#MockAndroidDevice#2e52cea6-94b0-4ea1-b9a8-c9135ede14ca-serial',
+ id: 'TestApp#Android#MockAndroidDevice#2e52cea6-94b0-4ea1-b9a8-c9135ede14ca-serial',
query: {
app: 'TestApp',
device: 'MockAndroidDevice',
@@ -1506,11 +1501,12 @@ test('Sandy plugin with custom import', async () => {
fileVersion: '0.9.99',
flipperReleaseRevision: undefined,
pluginStates2: {
- 'TestApp#Android#MockAndroidDevice#2e52cea6-94b0-4ea1-b9a8-c9135ede14ca-serial': {
- [plugin.id]: {
- count: 4,
+ 'TestApp#Android#MockAndroidDevice#2e52cea6-94b0-4ea1-b9a8-c9135ede14ca-serial':
+ {
+ [plugin.id]: {
+ count: 4,
+ },
},
- },
},
store: {
activeNotifications: [],
diff --git a/desktop/app/src/utils/__tests__/messageQueue.node.tsx b/desktop/app/src/utils/__tests__/messageQueue.node.tsx
index 94ffcafdf..0521107cd 100644
--- a/desktop/app/src/utils/__tests__/messageQueue.node.tsx
+++ b/desktop/app/src/utils/__tests__/messageQueue.node.tsx
@@ -109,12 +109,8 @@ test('queue - events are processed immediately if plugin is selected', async ()
});
test('queue - events are NOT processed immediately if plugin is NOT selected (but enabled)', async () => {
- const {
- store,
- client,
- sendMessage,
- device,
- } = await createMockFlipperWithPlugin(TestPlugin);
+ const {store, client, sendMessage, device} =
+ await createMockFlipperWithPlugin(TestPlugin);
selectDeviceLogs(store);
expect(store.getState().connections.selectedPlugin).not.toBe('TestPlugin');
@@ -203,12 +199,8 @@ test('queue - events are NOT processed immediately if plugin is NOT selected (bu
});
test('queue - events are queued for plugins that are favorite when app is not selected', async () => {
- const {
- device,
- store,
- sendMessage,
- createClient,
- } = await createMockFlipperWithPlugin(TestPlugin);
+ const {device, store, sendMessage, createClient} =
+ await createMockFlipperWithPlugin(TestPlugin);
selectDeviceLogs(store);
expect(store.getState().connections.selectedPlugin).not.toBe('TestPlugin');
@@ -235,13 +227,8 @@ test('queue - events are queued for plugins that are favorite when app is not se
});
test('queue - events are queued for plugins that are favorite when app is selected on different device', async () => {
- const {
- client,
- store,
- sendMessage,
- createDevice,
- createClient,
- } = await createMockFlipperWithPlugin(TestPlugin);
+ const {client, store, sendMessage, createDevice, createClient} =
+ await createMockFlipperWithPlugin(TestPlugin);
selectDeviceLogs(store);
expect(store.getState().connections.selectedPlugin).not.toBe('TestPlugin');
@@ -282,12 +269,8 @@ test('queue - events are queued for plugins that are favorite when app is select
});
test('queue - events processing will be paused', async () => {
- const {
- client,
- device,
- store,
- sendMessage,
- } = await createMockFlipperWithPlugin(TestPlugin);
+ const {client, device, store, sendMessage} =
+ await createMockFlipperWithPlugin(TestPlugin);
selectDeviceLogs(store);
sendMessage('inc', {});
@@ -330,12 +313,8 @@ test('queue - events processing will be paused', async () => {
});
test('queue - messages that arrive during processing will be queued', async () => {
- const {
- client,
- device,
- store,
- sendMessage,
- } = await createMockFlipperWithPlugin(TestPlugin);
+ const {client, device, store, sendMessage} =
+ await createMockFlipperWithPlugin(TestPlugin);
selectDeviceLogs(store);
sendMessage('inc', {});
@@ -380,12 +359,8 @@ test('queue - messages that arrive during processing will be queued', async () =
});
test('queue - processing can be cancelled', async () => {
- const {
- client,
- device,
- store,
- sendMessage,
- } = await createMockFlipperWithPlugin(TestPlugin);
+ const {client, device, store, sendMessage} =
+ await createMockFlipperWithPlugin(TestPlugin);
selectDeviceLogs(store);
sendMessage('inc', {});
@@ -415,12 +390,8 @@ test('queue - processing can be cancelled', async () => {
});
test('queue - make sure resetting plugin state clears the message queue', async () => {
- const {
- client,
- device,
- store,
- sendMessage,
- } = await createMockFlipperWithPlugin(TestPlugin);
+ const {client, device, store, sendMessage} =
+ await createMockFlipperWithPlugin(TestPlugin);
selectDeviceLogs(store);
sendMessage('inc', {});
@@ -486,12 +457,8 @@ test('client - incoming messages are buffered and flushed together', async () =>
static persistedStateReducer = jest.fn();
}
- const {
- client,
- store,
- device,
- sendMessage,
- } = await createMockFlipperWithPlugin(TestPlugin);
+ const {client, store, device, sendMessage} =
+ await createMockFlipperWithPlugin(TestPlugin);
selectDeviceLogs(store);
store.dispatch(registerPlugins([StubDeviceLogs]));
@@ -646,12 +613,8 @@ test('client - incoming messages are buffered and flushed together', async () =>
});
test('queue - messages that have not yet flushed be lost when disabling the plugin', async () => {
- const {
- client,
- store,
- sendMessage,
- pluginKey,
- } = await createMockFlipperWithPlugin(TestPlugin);
+ const {client, store, sendMessage, pluginKey} =
+ await createMockFlipperWithPlugin(TestPlugin);
selectDeviceLogs(store);
sendMessage('inc', {});
diff --git a/desktop/app/src/utils/__tests__/messageQueueSandy.node.tsx b/desktop/app/src/utils/__tests__/messageQueueSandy.node.tsx
index 394269e9d..cc49e2c1d 100644
--- a/desktop/app/src/utils/__tests__/messageQueueSandy.node.tsx
+++ b/desktop/app/src/utils/__tests__/messageQueueSandy.node.tsx
@@ -116,12 +116,8 @@ test('queue - events are processed immediately if plugin is selected', async ()
});
test('queue - events are NOT processed immediately if plugin is NOT selected (but enabled)', async () => {
- const {
- store,
- client,
- sendMessage,
- device,
- } = await createMockFlipperWithPlugin(TestPlugin);
+ const {store, client, sendMessage, device} =
+ await createMockFlipperWithPlugin(TestPlugin);
selectDeviceLogs(store);
expect(store.getState().connections.selectedPlugin).not.toBe('TestPlugin');
@@ -260,13 +256,8 @@ test('queue - events ARE processed immediately if plugin is NOT selected / enabl
});
test('queue - events are queued for plugins that are favorite when app is not selected', async () => {
- const {
- client,
- device,
- store,
- sendMessage,
- createClient,
- } = await createMockFlipperWithPlugin(TestPlugin);
+ const {client, device, store, sendMessage, createClient} =
+ await createMockFlipperWithPlugin(TestPlugin);
selectDeviceLogs(store);
expect(store.getState().connections.selectedPlugin).not.toBe('TestPlugin');
@@ -293,13 +284,8 @@ test('queue - events are queued for plugins that are favorite when app is not se
});
test('queue - events are queued for plugins that are favorite when app is selected on different device', async () => {
- const {
- client,
- store,
- sendMessage,
- createDevice,
- createClient,
- } = await createMockFlipperWithPlugin(TestPlugin);
+ const {client, store, sendMessage, createDevice, createClient} =
+ await createMockFlipperWithPlugin(TestPlugin);
selectDeviceLogs(store);
expect(store.getState().connections.selectedPlugin).not.toBe('TestPlugin');
@@ -340,12 +326,8 @@ test('queue - events are queued for plugins that are favorite when app is select
});
test('queue - events processing will be paused', async () => {
- const {
- client,
- device,
- store,
- sendMessage,
- } = await createMockFlipperWithPlugin(TestPlugin);
+ const {client, device, store, sendMessage} =
+ await createMockFlipperWithPlugin(TestPlugin);
selectDeviceLogs(store);
sendMessage('inc', {});
@@ -390,12 +372,8 @@ test('queue - events processing will be paused', async () => {
});
test('queue - messages that arrive during processing will be queued', async () => {
- const {
- client,
- device,
- store,
- sendMessage,
- } = await createMockFlipperWithPlugin(TestPlugin);
+ const {client, device, store, sendMessage} =
+ await createMockFlipperWithPlugin(TestPlugin);
selectDeviceLogs(store);
sendMessage('inc', {});
@@ -446,12 +424,8 @@ test('queue - messages that arrive during processing will be queued', async () =
});
test('queue - processing can be cancelled', async () => {
- const {
- client,
- device,
- store,
- sendMessage,
- } = await createMockFlipperWithPlugin(TestPlugin);
+ const {client, device, store, sendMessage} =
+ await createMockFlipperWithPlugin(TestPlugin);
selectDeviceLogs(store);
sendMessage('inc', {});
@@ -487,12 +461,8 @@ test('queue - processing can be cancelled', async () => {
});
test('queue - make sure resetting plugin state clears the message queue', async () => {
- const {
- client,
- device,
- store,
- sendMessage,
- } = await createMockFlipperWithPlugin(TestPlugin);
+ const {client, device, store, sendMessage} =
+ await createMockFlipperWithPlugin(TestPlugin);
selectDeviceLogs(store);
sendMessage('inc', {});
@@ -522,13 +492,8 @@ test('client - incoming messages are buffered and flushed together', async () =>
static persistedStateReducer = jest.fn();
}
- const {
- client,
- store,
- device,
- sendMessage,
- pluginKey,
- } = await createMockFlipperWithPlugin(TestPlugin);
+ const {client, store, device, sendMessage, pluginKey} =
+ await createMockFlipperWithPlugin(TestPlugin);
selectDeviceLogs(store);
store.dispatch(registerPlugins([StubDeviceLogs]));
@@ -687,12 +652,8 @@ test('client - incoming messages are buffered and flushed together', async () =>
});
test('queue - messages that have not yet flushed be lost when disabling the plugin', async () => {
- const {
- client,
- store,
- sendMessage,
- pluginKey,
- } = await createMockFlipperWithPlugin(TestPlugin);
+ const {client, store, sendMessage, pluginKey} =
+ await createMockFlipperWithPlugin(TestPlugin);
selectDeviceLogs(store);
sendMessage('inc', {});
diff --git a/desktop/app/src/utils/exportData.tsx b/desktop/app/src/utils/exportData.tsx
index d975439ab..02c3062b5 100644
--- a/desktop/app/src/utils/exportData.tsx
+++ b/desktop/app/src/utils/exportData.tsx
@@ -201,13 +201,8 @@ export function processPluginStates(
export function processNotificationStates(
options: ProcessNotificationStatesOptions,
): Array {
- const {
- clients,
- serial,
- allActiveNotifications,
- devicePlugins,
- statusUpdate,
- } = options;
+ const {clients, serial, allActiveNotifications, devicePlugins, statusUpdate} =
+ options;
statusUpdate &&
statusUpdate('Filtering the notifications for the filtered Clients...');
const activeNotifications = allActiveNotifications.filter((notif) => {
diff --git a/desktop/app/src/utils/icons.ts b/desktop/app/src/utils/icons.ts
index 4f249bb5f..00a27d783 100644
--- a/desktop/app/src/utils/icons.ts
+++ b/desktop/app/src/utils/icons.ts
@@ -34,9 +34,10 @@ export function getIcons(): Icons {
// Takes a string like 'star', or 'star-outline', and converts it to
// {trimmedName: 'star', variant: 'filled'} or {trimmedName: 'star', variant: 'outline'}
-function getIconPartsFromName(
- icon: string,
-): {trimmedName: string; variant: 'outline' | 'filled'} {
+function getIconPartsFromName(icon: string): {
+ trimmedName: string;
+ variant: 'outline' | 'filled';
+} {
const isOutlineVersion = icon.endsWith('-outline');
const trimmedName = isOutlineVersion ? icon.replace('-outline', '') : icon;
const variant = isOutlineVersion ? 'outline' : 'filled';
diff --git a/desktop/app/src/utils/js-client-server-utils/serverUtils.tsx b/desktop/app/src/utils/js-client-server-utils/serverUtils.tsx
index ae3f97409..92462f7e3 100644
--- a/desktop/app/src/utils/js-client-server-utils/serverUtils.tsx
+++ b/desktop/app/src/utils/js-client-server-utils/serverUtils.tsx
@@ -157,7 +157,8 @@ export function launchJsEmulator(url: string, height: number, width: number) {
}
export class JSClientFlipperConnection
- implements FlipperClientConnection {
+ implements FlipperClientConnection
+{
webContentsId: number;
connStatusSubscribers: Set> = new Set();
connStatus: ConnectionStatus;
diff --git a/desktop/app/src/utils/js-client-server-utils/websocketClientFlipperConnection.tsx b/desktop/app/src/utils/js-client-server-utils/websocketClientFlipperConnection.tsx
index c197f9cc2..56d6887bf 100644
--- a/desktop/app/src/utils/js-client-server-utils/websocketClientFlipperConnection.tsx
+++ b/desktop/app/src/utils/js-client-server-utils/websocketClientFlipperConnection.tsx
@@ -13,7 +13,8 @@ import {Payload, ConnectionStatus, ISubscriber} from 'rsocket-types';
import WebSocket from 'ws';
export class WebsocketClientFlipperConnection
- implements FlipperClientConnection {
+ implements FlipperClientConnection
+{
websocket: WebSocket;
connStatusSubscribers: Set> = new Set();
connStatus: ConnectionStatus;
diff --git a/desktop/app/src/utils/packageMetadata.tsx b/desktop/app/src/utils/packageMetadata.tsx
index e3e3bc753..b4d3aaa7b 100644
--- a/desktop/app/src/utils/packageMetadata.tsx
+++ b/desktop/app/src/utils/packageMetadata.tsx
@@ -26,13 +26,12 @@ const getPackageJSON = async () => {
return JSON.parse(content);
};
-export const readCurrentRevision: () => Promise<
- string | undefined
-> = lodash.memoize(async () => {
- // This is provided as part of the bundling process for headless.
- if (global.__REVISION__) {
- return global.__REVISION__;
- }
- const json = await getPackageJSON();
- return json.revision;
-});
+export const readCurrentRevision: () => Promise =
+ lodash.memoize(async () => {
+ // This is provided as part of the bundling process for headless.
+ if (global.__REVISION__) {
+ return global.__REVISION__;
+ }
+ const json = await getPackageJSON();
+ return json.revision;
+ });
diff --git a/desktop/app/src/utils/self-inspection/selfInspectionClient.tsx b/desktop/app/src/utils/self-inspection/selfInspectionClient.tsx
index 4bc3c5f5a..8a158020d 100644
--- a/desktop/app/src/utils/self-inspection/selfInspectionClient.tsx
+++ b/desktop/app/src/utils/self-inspection/selfInspectionClient.tsx
@@ -26,7 +26,8 @@ interface IFutureSubject {
export class SelfInspectionFlipperClient
extends FlipperClient
- implements FlipperClientConnection {
+ implements FlipperClientConnection
+{
connStatusSubscribers: Set> = new Set();
connStatus: ConnectionStatus = {kind: 'CONNECTED'};
diff --git a/desktop/app/src/utils/serialization.tsx b/desktop/app/src/utils/serialization.tsx
index d646389c6..8417db86a 100644
--- a/desktop/app/src/utils/serialization.tsx
+++ b/desktop/app/src/utils/serialization.tsx
@@ -15,12 +15,9 @@ export async function serialize(
statusUpdate?: (msg: string) => void,
statusMsg?: string,
): Promise {
- return makeObjectSerializable(
- obj,
- idler,
- statusUpdate,
- statusMsg,
- ).then((obj) => JSON.stringify(obj));
+ return makeObjectSerializable(obj, idler, statusUpdate, statusMsg).then(
+ (obj) => JSON.stringify(obj),
+ );
}
export function deserialize(str: string): any {
diff --git a/desktop/app/src/utils/sideEffect.tsx b/desktop/app/src/utils/sideEffect.tsx
index 46d0f9821..e4350a009 100644
--- a/desktop/app/src/utils/sideEffect.tsx
+++ b/desktop/app/src/utils/sideEffect.tsx
@@ -25,7 +25,7 @@ import {shallowEqual} from 'react-redux';
export function sideEffect<
Store extends ReduxStore,
V,
- State = Store extends ReduxStore ? S : never
+ State = Store extends ReduxStore ? S : never,
>(
store: Store,
options: {
diff --git a/desktop/babel-transformer/package.json b/desktop/babel-transformer/package.json
index 7dc74207d..127b3794b 100644
--- a/desktop/babel-transformer/package.json
+++ b/desktop/babel-transformer/package.json
@@ -32,7 +32,7 @@
"devDependencies": {
"@types/jest": "26.0.23",
"jest": "^26.6.3",
- "prettier": "^2.2.1",
+ "prettier": "^2.3.0",
"rimraf": "^3.0.2",
"ts-jest": "^26.5.6",
"ts-node": "^9.1.1",
diff --git a/desktop/doctor/package.json b/desktop/doctor/package.json
index 5dfc6e40e..f71562b6b 100644
--- a/desktop/doctor/package.json
+++ b/desktop/doctor/package.json
@@ -17,7 +17,7 @@
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-react": "^7.23.2",
"jest": "^26.6.3",
- "prettier": "^2.2.1",
+ "prettier": "^2.3.0",
"ts-jest": "^26.5.6",
"tslint-config-prettier": "^1.18.0",
"typescript": "^4.2.4"
diff --git a/desktop/doctor/src/index.ts b/desktop/doctor/src/index.ts
index 8c28808fb..5a347e6c8 100644
--- a/desktop/doctor/src/index.ts
+++ b/desktop/doctor/src/index.ts
@@ -301,38 +301,37 @@ export async function runHealthchecks(): Promise<
> {
const environmentInfo = await getEnvInfo();
const healthchecks: Healthchecks = getHealthchecks();
- const results: Array<
- CategoryResult | SkippedHealthcheckCategory
- > = await Promise.all(
- Object.entries(healthchecks).map(async ([key, category]) => {
- if (category.isSkipped) {
- return category;
- }
- const categoryResult: CategoryResult = [
- key,
- {
- label: category.label,
- results: await Promise.all(
- category.healthchecks.map(
- async ({key, label, run, isRequired}) => ({
- key,
- label,
- isRequired: isRequired ?? true,
- result: await run(environmentInfo).catch((e) => {
- console.error(e);
- // TODO Improve result type to be: OK | Problem(message, fix...)
- return {
- hasProblem: true,
- };
+ const results: Array =
+ await Promise.all(
+ Object.entries(healthchecks).map(async ([key, category]) => {
+ if (category.isSkipped) {
+ return category;
+ }
+ const categoryResult: CategoryResult = [
+ key,
+ {
+ label: category.label,
+ results: await Promise.all(
+ category.healthchecks.map(
+ async ({key, label, run, isRequired}) => ({
+ key,
+ label,
+ isRequired: isRequired ?? true,
+ result: await run(environmentInfo).catch((e) => {
+ console.error(e);
+ // TODO Improve result type to be: OK | Problem(message, fix...)
+ return {
+ hasProblem: true,
+ };
+ }),
}),
- }),
+ ),
),
- ),
- },
- ];
- return categoryResult;
- }),
- );
+ },
+ ];
+ return categoryResult;
+ }),
+ );
return results;
}
diff --git a/desktop/eslint-plugin-flipper/package.json b/desktop/eslint-plugin-flipper/package.json
index dbd15cb53..9b8b1c998 100644
--- a/desktop/eslint-plugin-flipper/package.json
+++ b/desktop/eslint-plugin-flipper/package.json
@@ -18,7 +18,7 @@
"@typescript-eslint/parser": "^4.22.0",
"flipper-test-utils": "0.0.0",
"jest": "^26.6.3",
- "prettier": "^2.2.1",
+ "prettier": "^2.3.0",
"rimraf": "^3.0.2",
"ts-jest": "^26.5.6",
"ts-node": "^9.1.1",
diff --git a/desktop/flipper-plugin/src/__tests__/test-utils-device.node.tsx b/desktop/flipper-plugin/src/__tests__/test-utils-device.node.tsx
index 88b9fbbf2..3e9a7cc84 100644
--- a/desktop/flipper-plugin/src/__tests__/test-utils-device.node.tsx
+++ b/desktop/flipper-plugin/src/__tests__/test-utils-device.node.tsx
@@ -67,9 +67,8 @@ test('it can start a device plugin and listen to lifecycle events', () => {
});
test('it can render a device plugin', () => {
- const {renderer, instance, sendLogEntry} = TestUtils.renderDevicePlugin(
- testPlugin,
- );
+ const {renderer, instance, sendLogEntry} =
+ TestUtils.renderDevicePlugin(testPlugin);
expect(renderer.baseElement).toMatchInlineSnapshot(`
diff --git a/desktop/flipper-plugin/src/data-source/DataSource.tsx b/desktop/flipper-plugin/src/data-source/DataSource.tsx
index fdc95dbec..b11dfa7ba 100644
--- a/desktop/flipper-plugin/src/data-source/DataSource.tsx
+++ b/desktop/flipper-plugin/src/data-source/DataSource.tsx
@@ -86,7 +86,7 @@ type OutputChange =
export class DataSource<
T = any,
KEY extends keyof T = any,
- KEY_TYPE extends string | number | never = ExtractKeyType
+ KEY_TYPE extends string | number | never = ExtractKeyType,
> {
private nextId = 0;
private _records: Entry[] = [];
diff --git a/desktop/flipper-plugin/src/plugin/MenuEntry.tsx b/desktop/flipper-plugin/src/plugin/MenuEntry.tsx
index eeaa7b199..00bfaad0f 100644
--- a/desktop/flipper-plugin/src/plugin/MenuEntry.tsx
+++ b/desktop/flipper-plugin/src/plugin/MenuEntry.tsx
@@ -54,9 +54,9 @@ export const buildInMenuEntries = {
export function normalizeMenuEntry(entry: MenuEntry): NormalizedMenuEntry;
export function normalizeMenuEntry(entry: any): NormalizedMenuEntry {
- const builtInEntry:
- | NormalizedMenuEntry
- | undefined = (buildInMenuEntries as any)[entry.action];
+ const builtInEntry: NormalizedMenuEntry | undefined = (
+ buildInMenuEntries as any
+ )[entry.action];
return builtInEntry
? {...builtInEntry, ...entry}
: {
diff --git a/desktop/flipper-plugin/src/plugin/Plugin.tsx b/desktop/flipper-plugin/src/plugin/Plugin.tsx
index dc7ada1cb..d84422c8d 100644
--- a/desktop/flipper-plugin/src/plugin/Plugin.tsx
+++ b/desktop/flipper-plugin/src/plugin/Plugin.tsx
@@ -27,7 +27,7 @@ type Message = {
*/
export interface PluginClient<
Events extends EventsContract = {},
- Methods extends MethodsContract = {}
+ Methods extends MethodsContract = {},
> extends BasePluginClient {
/**
* Identifier that uniquely identifies the connected application
@@ -128,7 +128,7 @@ export interface RealFlipperClient {
export type PluginFactory<
Events extends EventsContract,
- Methods extends MethodsContract
+ Methods extends MethodsContract,
> = (client: PluginClient) => object;
export type FlipperPluginComponent = React.FC<{}>;
diff --git a/desktop/flipper-plugin/src/plugin/PluginContext.tsx b/desktop/flipper-plugin/src/plugin/PluginContext.tsx
index c5018d658..3cb5ee2f5 100644
--- a/desktop/flipper-plugin/src/plugin/PluginContext.tsx
+++ b/desktop/flipper-plugin/src/plugin/PluginContext.tsx
@@ -11,9 +11,10 @@ import {createContext, useContext} from 'react';
import {SandyPluginInstance, PluginFactory} from './Plugin';
import {SandyDevicePluginInstance, DevicePluginFactory} from './DevicePlugin';
-export const SandyPluginContext = createContext<
- SandyPluginInstance | SandyDevicePluginInstance | undefined
->(undefined);
+export const SandyPluginContext =
+ createContext(
+ undefined,
+ );
export function usePluginInstance():
| SandyPluginInstance
@@ -26,7 +27,7 @@ export function usePluginInstance():
}
export function usePlugin<
- Factory extends PluginFactory | DevicePluginFactory
+ Factory extends PluginFactory | DevicePluginFactory,
>(plugin: Factory): ReturnType {
const pluginInstance = usePluginInstance();
// In principle we don't *need* the plugin, but having it passed it makes sure the
diff --git a/desktop/flipper-plugin/src/test-utils/test-utils.tsx b/desktop/flipper-plugin/src/test-utils/test-utils.tsx
index 05bcc9233..67b7cc514 100644
--- a/desktop/flipper-plugin/src/test-utils/test-utils.tsx
+++ b/desktop/flipper-plugin/src/test-utils/test-utils.tsx
@@ -60,17 +60,15 @@ type ExtractClientType> = Parameters<
Module['plugin']
>[0];
-type ExtractMethodsType<
- Module extends FlipperPluginModule
-> = ExtractClientType extends PluginClient
- ? Methods
- : never;
+type ExtractMethodsType> =
+ ExtractClientType extends PluginClient
+ ? Methods
+ : never;
-type ExtractEventsType<
- Module extends FlipperPluginModule
-> = ExtractClientType extends PluginClient
- ? Events
- : never;
+type ExtractEventsType> =
+ ExtractClientType extends PluginClient
+ ? Events
+ : never;
interface BasePluginResult {
/**
diff --git a/desktop/flipper-plugin/src/ui/DataList.tsx b/desktop/flipper-plugin/src/ui/DataList.tsx
index 9be896662..49e40fdf9 100644
--- a/desktop/flipper-plugin/src/ui/DataList.tsx
+++ b/desktop/flipper-plugin/src/ui/DataList.tsx
@@ -78,7 +78,7 @@ export type DataListProps = DataListBaseProps &
Omit, 'records' | 'dataSource' | 'columns' | 'onSelect'>;
export const DataList: React.FC> = function DataList<
- T extends Item
+ T extends Item,
>({
selection: baseSelection,
onSelect,
diff --git a/desktop/flipper-plugin/src/ui/Interactive.tsx b/desktop/flipper-plugin/src/ui/Interactive.tsx
index e4660f909..b9e52715e 100644
--- a/desktop/flipper-plugin/src/ui/Interactive.tsx
+++ b/desktop/flipper-plugin/src/ui/Interactive.tsx
@@ -404,11 +404,8 @@ export class Interactive extends React.Component<
}
calculateResize(event: MouseEvent) {
- const {
- resizingInitialCursor,
- resizingInitialRect,
- resizingSides,
- } = this.state;
+ const {resizingInitialCursor, resizingInitialRect, resizingSides} =
+ this.state;
const deltaLeft = resizingInitialCursor!.left - event.clientX;
const deltaTop = resizingInitialCursor!.top - event.clientY;
@@ -517,9 +514,7 @@ export class Interactive extends React.Component<
}
}
- checkIfResizable(
- event: MouseEvent,
- ):
+ checkIfResizable(event: MouseEvent):
| {
left: boolean;
right: boolean;
diff --git a/desktop/flipper-plugin/src/ui/Layout.tsx b/desktop/flipper-plugin/src/ui/Layout.tsx
index a49887b50..a51c1baee 100644
--- a/desktop/flipper-plugin/src/ui/Layout.tsx
+++ b/desktop/flipper-plugin/src/ui/Layout.tsx
@@ -190,14 +190,8 @@ function renderSplitLayout(
child2 = ;
}
if ('resizable' in props && props.resizable) {
- const {
- width,
- height,
- minHeight,
- minWidth,
- maxHeight,
- maxWidth,
- } = props as any;
+ const {width, height, minHeight, minWidth, maxHeight, maxWidth} =
+ props as any;
const sizeProps =
direction === 'column'
? ({
diff --git a/desktop/flipper-plugin/src/ui/Panel.tsx b/desktop/flipper-plugin/src/ui/Panel.tsx
index 7588a423f..c1d3ba3e9 100644
--- a/desktop/flipper-plugin/src/ui/Panel.tsx
+++ b/desktop/flipper-plugin/src/ui/Panel.tsx
@@ -94,7 +94,8 @@ const StyledCollapse = styled(Collapse)({
'& > .ant-collapse-item': {
borderBottom: 'none',
},
- '& > .ant-collapse-item > .ant-collapse-content > .ant-collapse-content-box': {
- padding: 0,
- },
+ '& > .ant-collapse-item > .ant-collapse-content > .ant-collapse-content-box':
+ {
+ padding: 0,
+ },
});
diff --git a/desktop/flipper-plugin/src/ui/data-inspector/DataInspectorNode.tsx b/desktop/flipper-plugin/src/ui/data-inspector/DataInspectorNode.tsx
index c1d118392..f2671a70b 100644
--- a/desktop/flipper-plugin/src/ui/data-inspector/DataInspectorNode.tsx
+++ b/desktop/flipper-plugin/src/ui/data-inspector/DataInspectorNode.tsx
@@ -326,18 +326,14 @@ export const DataInspectorNode: React.FC = memo(
[extractValueProp],
);
- const res = useMemo(() => extractValue(data, depth, path), [
- extractValue,
- data,
- depth,
- path,
- ]);
- const resDiff = useMemo(() => extractValue(diff, depth, path), [
- extractValue,
- diff,
- depth,
- path,
- ]);
+ const res = useMemo(
+ () => extractValue(data, depth, path),
+ [extractValue, data, depth, path],
+ );
+ const resDiff = useMemo(
+ () => extractValue(diff, depth, path),
+ [extractValue, diff, depth, path],
+ );
const ancestry = useMemo(
() => (res ? parentAncestry!.concat([res.value]) : []),
[parentAncestry, res?.value],
diff --git a/desktop/flipper-plugin/src/utils/createTablePlugin.tsx b/desktop/flipper-plugin/src/utils/createTablePlugin.tsx
index f053654ce..a1a04c6d5 100644
--- a/desktop/flipper-plugin/src/utils/createTablePlugin.tsx
+++ b/desktop/flipper-plugin/src/utils/createTablePlugin.tsx
@@ -18,9 +18,7 @@ import {MasterDetail} from '../ui/MasterDetail';
import {createDataSource} from '../state/createDataSource';
type PluginResult = {
- plugin(
- client: PluginClient>,
- ): {
+ plugin(client: PluginClient>): {
rows: DataSource;
};
Component(): React.ReactElement;
@@ -49,7 +47,7 @@ export function createTablePlugin(props: {
}): PluginResult;
export function createTablePlugin<
Raw extends object,
- Row extends object = Raw
+ Row extends object = Raw,
>(props: {
buildRow: (record: Raw) => Row;
method: string;
@@ -63,7 +61,7 @@ export function createTablePlugin<
Raw extends object,
Method extends string,
ResetMethod extends string,
- Row extends object = Raw
+ Row extends object = Raw,
>(props: {
method: Method;
resetMethod?: ResetMethod;
@@ -89,7 +87,7 @@ export function createTablePlugin<
}
const record = props.buildRow
? props.buildRow(event)
- : ((event as any) as Row);
+ : (event as any as Row);
if (props.key) {
rows.upsert(record);
} else {
diff --git a/desktop/flipper-plugin/src/utils/parseColor.tsx b/desktop/flipper-plugin/src/utils/parseColor.tsx
index 8704bc43d..4740cf3ed 100644
--- a/desktop/flipper-plugin/src/utils/parseColor.tsx
+++ b/desktop/flipper-plugin/src/utils/parseColor.tsx
@@ -7,9 +7,7 @@
* @format
*/
-export function parseColor(
- val: string | number,
-):
+export function parseColor(val: string | number):
| {
r: number;
g: number;
diff --git a/desktop/flipper-plugin/src/utils/urlRegex.tsx b/desktop/flipper-plugin/src/utils/urlRegex.tsx
index 6d639d5bd..577e49ee8 100644
--- a/desktop/flipper-plugin/src/utils/urlRegex.tsx
+++ b/desktop/flipper-plugin/src/utils/urlRegex.tsx
@@ -9,4 +9,5 @@
// Source: https://github.com/sindresorhus/linkify-urls/blob/e0cf2a2d51dc8f5f95d93f97ecb1cc804cc9e6be/index.js#L5
// n.b. no /g flag, as that makes the regex stateful! Which is not needed for splitting
-export const urlRegex = /((?) {
displayCPUDetail: true,
});
- const updateCoreFrequency: (
- core: number,
- type: string,
- ) => Promise = async (core: number, type: string) => {
- const output = await executeShell(
- 'cat /sys/devices/system/cpu/cpu' + core + '/cpufreq/' + type,
- );
- cpuState.update((draft) => {
- const newFreq = isNormalInteger(output) ? parseInt(output, 10) : -1;
- // update table only if frequency changed
- if (draft.cpuFreq[core][type] != newFreq) {
- draft.cpuFreq[core][type] = newFreq;
- if (type == 'scaling_cur_freq' && draft.cpuFreq[core][type] < 0) {
- // cannot find current freq means offline
- draft.cpuFreq[core][type] = -2;
+ const updateCoreFrequency: (core: number, type: string) => Promise =
+ async (core: number, type: string) => {
+ const output = await executeShell(
+ 'cat /sys/devices/system/cpu/cpu' + core + '/cpufreq/' + type,
+ );
+ cpuState.update((draft) => {
+ const newFreq = isNormalInteger(output) ? parseInt(output, 10) : -1;
+ // update table only if frequency changed
+ if (draft.cpuFreq[core][type] != newFreq) {
+ draft.cpuFreq[core][type] = newFreq;
+ if (type == 'scaling_cur_freq' && draft.cpuFreq[core][type] < 0) {
+ // cannot find current freq means offline
+ draft.cpuFreq[core][type] = -2;
+ }
}
- }
- });
- };
+ });
+ };
const updateAvailableFrequencies: (core: number) => Promise = async (
core: number,
diff --git a/desktop/plugins/public/databases/DatabasesPlugin.tsx b/desktop/plugins/public/databases/DatabasesPlugin.tsx
index ad676e9eb..551c19f29 100644
--- a/desktop/plugins/public/databases/DatabasesPlugin.tsx
+++ b/desktop/plugins/public/databases/DatabasesPlugin.tsx
@@ -332,9 +332,10 @@ const FavoritesMenu = React.memo(
favorites: string[];
onClick: (value: string) => void;
}) => {
- const onMenuClick = useCallback((p: any) => onClick(p.key as string), [
- onClick,
- ]);
+ const onMenuClick = useCallback(
+ (p: any) => onClick(p.key as string),
+ [onClick],
+ );
return (