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

@@ -127,8 +127,8 @@ compilePlugins(
},
pluginPaths,
path.join(flipperDir, 'plugins'),
).then(dynamicPlugins => {
ipcMain.on('get-dynamic-plugins', event => {
).then((dynamicPlugins) => {
ipcMain.on('get-dynamic-plugins', (event) => {
event.returnValue = dynamicPlugins;
});
pluginsCompiled = true;
@@ -163,7 +163,7 @@ app.on('window-all-closed', () => {
app.on('will-finish-launching', () => {
// Protocol handler for osx
app.on('open-url', function(event, url) {
app.on('open-url', function (event, url) {
event.preventDefault();
deeplinkURL = url;
argv.url = url;
@@ -225,7 +225,7 @@ app.on('will-quit', () => {
globalShortcut.unregisterAll();
});
ipcMain.on('componentDidMount', _event => {
ipcMain.on('componentDidMount', (_event) => {
if (deeplinkURL) {
win.webContents.send('flipper-protocol-handler', deeplinkURL);
deeplinkURL = undefined;
@@ -237,7 +237,7 @@ ipcMain.on('componentDidMount', _event => {
}
});
ipcMain.on('getLaunchTime', event => {
ipcMain.on('getLaunchTime', (event) => {
if (launchStartTime) {
event.sender.send('getLaunchTime', launchStartTime);
// set launchTime to null to only report it once, to prevents reporting wrong
@@ -255,7 +255,7 @@ ipcMain.on(
// Forwarding notification events to renderer process
// https://electronjs.org/docs/api/notification#instance-events
['show', 'click', 'close', 'reply', 'action'].forEach(eventName => {
['show', 'click', 'close', 'reply', 'action'].forEach((eventName) => {
// TODO: refactor this to make typescript happy
// @ts-ignore
n.on(eventName, (event, ...args) => {