Fix Flipper lints #16
Summary: Larger list of fixes. Adding another package to the flipper export is a bit nasty but it unblocks us for now and centralises `remote` access which seems like a win for FAAS. Reviewed By: mweststrate Differential Revision: D30785421 fbshipit-source-id: 931297e8566b5d8a213b69ae87d0cda7648b3ed4
This commit is contained in:
committed by
Facebook GitHub Bot
parent
262cd6105b
commit
47099cfd31
@@ -94,9 +94,11 @@ export function plugin(client: PluginClient<Events, Methods>) {
|
||||
console.error('[Navigation] Failed to find appMatchPatterns', e);
|
||||
});
|
||||
|
||||
readBookmarksFromDB().then((bookmarksData) => {
|
||||
bookmarks.set(bookmarksData);
|
||||
});
|
||||
readBookmarksFromDB()
|
||||
.then((bookmarksData) => {
|
||||
bookmarks.set(bookmarksData);
|
||||
})
|
||||
.catch((e) => console.error('[navigation] readBookmarksFromDB failed:', e));
|
||||
|
||||
function navigateTo(query: string) {
|
||||
const filteredQuery = filterOptionalParameters(query);
|
||||
|
||||
@@ -9,15 +9,13 @@
|
||||
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import {BaseDevice, AndroidDevice, IOSDevice} from 'flipper';
|
||||
import {BaseDevice, AndroidDevice, IOSDevice, getAppPath} from 'flipper';
|
||||
import {AppMatchPattern} from '../types';
|
||||
import {remote} from 'electron';
|
||||
|
||||
let patternsPath: string | undefined;
|
||||
|
||||
function getPatternsBasePath() {
|
||||
return (patternsPath =
|
||||
patternsPath ?? path.join(remote.app.getAppPath(), 'facebook'));
|
||||
return (patternsPath = patternsPath ?? path.join(getAppPath(), 'facebook'));
|
||||
}
|
||||
|
||||
const extractAppNameFromSelectedApp = (selectedApp: string | null) => {
|
||||
|
||||
@@ -41,7 +41,9 @@ const openNavigationPluginDB: () => Promise<IDBDatabase> = () => {
|
||||
);
|
||||
openRequest.onupgradeneeded = () => {
|
||||
const db = openRequest.result;
|
||||
initializeNavigationPluginDB(db).then(() => resolve(db));
|
||||
initializeNavigationPluginDB(db)
|
||||
.then(() => resolve(db))
|
||||
.catch(reject);
|
||||
};
|
||||
openRequest.onerror = () => reject(openRequest.error);
|
||||
openRequest.onsuccess = () => resolve(openRequest.result);
|
||||
|
||||
Reference in New Issue
Block a user