From 74c3930e0a5ed264f330bc32c27116ead1063c5d Mon Sep 17 00:00:00 2001 From: Ven Date: Thu, 6 Oct 2022 00:42:58 +0200 Subject: add eslint config (#53) * eslint * workflow * lint main --- src/ipcMain/index.ts | 6 +++--- src/ipcMain/updater.ts | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src/ipcMain') diff --git a/src/ipcMain/index.ts b/src/ipcMain/index.ts index 22f05fd..61b631e 100644 --- a/src/ipcMain/index.ts +++ b/src/ipcMain/index.ts @@ -1,9 +1,9 @@ import { app, BrowserWindow, desktopCapturer, ipcMain, shell } from "electron"; import { mkdirSync, readFileSync, watch } from "fs"; import { open, readFile, writeFile } from "fs/promises"; -import { join } from 'path'; +import { join } from "path"; import { debounce } from "../utils/debounce"; -import IpcEvents from '../utils/IpcEvents'; +import IpcEvents from "../utils/IpcEvents"; import "./updater"; @@ -47,7 +47,7 @@ ipcMain.handle(IpcEvents.OPEN_EXTERNAL, (_, url) => { ipcMain.handle(IpcEvents.GET_QUICK_CSS, () => readCss()); ipcMain.handle(IpcEvents.GET_SETTINGS_DIR, () => SETTINGS_DIR); -ipcMain.on(IpcEvents.GET_SETTINGS, (e) => e.returnValue = readSettings()); +ipcMain.on(IpcEvents.GET_SETTINGS, e => e.returnValue = readSettings()); let settingsWriteQueue = Promise.resolve(); ipcMain.handle(IpcEvents.SET_SETTINGS, (_, s) => { diff --git a/src/ipcMain/updater.ts b/src/ipcMain/updater.ts index cd1fc6c..0801e0b 100644 --- a/src/ipcMain/updater.ts +++ b/src/ipcMain/updater.ts @@ -1,10 +1,10 @@ -import { ipcMain } from 'electron'; +import { ipcMain } from "electron"; import { promisify } from "util"; import IpcEvents from "../utils/IpcEvents"; -import { execFile as cpExecFile } from 'child_process'; -import { join } from 'path'; -import { createReadStream } from 'fs'; -import { createHash } from 'crypto'; +import { execFile as cpExecFile } from "child_process"; +import { join } from "path"; +import { createReadStream } from "fs"; +import { createHash } from "crypto"; const VENCORD_SRC_DIR = join(__dirname, ".."); @@ -64,7 +64,7 @@ async function getRepo() { async function calculateGitChanges() { await git("fetch"); - const res = await git("log", `HEAD...origin/main`, "--pretty=format:%an/%h/%s"); + const res = await git("log", "HEAD...origin/main", "--pretty=format:%an/%h/%s"); const commits = res.stdout.trim(); return commits ? commits.split("\n").map(line => { -- cgit