From ba8fd685bb3e28f9b6e24596fcf959a37b2013a4 Mon Sep 17 00:00:00 2001 From: rhysd Date: Sun, 16 Apr 2017 12:44:53 +0900 Subject: [PATCH] tslint --- main/app.ts | 4 ++-- main/config.ts | 4 ++-- renderer/index.ts | 2 +- renderer/ipc.ts | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/main/app.ts b/main/app.ts index b481dc7..5691329 100644 --- a/main/app.ts +++ b/main/app.ts @@ -3,7 +3,7 @@ import {app, BrowserWindow, globalShortcut, Tray, shell} from 'electron'; import windowState = require('electron-window-state'); import * as menubar from 'menubar'; import log from './log'; -import {Config, Account} from './config' +import {Config, Account} from './config'; const IS_DEBUG = process.env.NODE_ENV === 'development'; const IS_DARWIN = process.platform === 'darwin'; @@ -44,7 +44,7 @@ function trayIcon(color: string) { }@2x.png`); } -export default function startApp (config: Config) { +export default function startApp(config: Config) { return (config.normal_window ? startNormalWindow : startMenuBar)(config) .then(win => new App(win, config)); } diff --git a/main/config.ts b/main/config.ts index 21a3eac..524ea85 100644 --- a/main/config.ts +++ b/main/config.ts @@ -59,7 +59,7 @@ function showDyingDialog(title: string, detail: string) { } function recommendConfigAndDie(file: string) { - const title = 'Please write configuration in JSON' + const title = 'Please write configuration in JSON'; const detail = 'You need to write up name and host in first item of accounts. Restart this app after writing up them. Please see README for more detail: https://github.com/rhysd/Mstdn#readme'; shell.openItem(file); showDyingDialog(title, detail); @@ -101,7 +101,7 @@ export default function loadConfig(): Promise { } } catch (e) { log.debug('Error on loading JSON file', e); - showDyingDialog('Error on loading JSON file', e.message) + showDyingDialog('Error on loading JSON file', e.message); } }); }); diff --git a/renderer/index.ts b/renderer/index.ts index 0d7c4e8..d9135a2 100644 --- a/renderer/index.ts +++ b/renderer/index.ts @@ -25,7 +25,7 @@ const ShortcutActions = { 'scroll-up': () => { scrollable().scrollTop -= window.innerHeight / 3; }, -} as {[action: string]: () => void} +} as {[action: string]: () => void}; function setupKeybinds(keybinds: {[key: string]: string}, host: string) { for (const key in keybinds) { diff --git a/renderer/ipc.ts b/renderer/ipc.ts index 35f6827..a954c5c 100644 --- a/renderer/ipc.ts +++ b/renderer/ipc.ts @@ -3,7 +3,7 @@ import r from './require'; const electron = r('electron'); const ipc = electron.ipcRenderer; -export function on(channel: IpcChannel, callback: Function) { +export function on(channel: IpcChannel, callback: (...args: any[]) => void) { ipc.on(channel, (...args: any[]) => { log.debug('IPC: Received from:', channel, args); callback(...args);