From 7b16fa9f38cc4dcfe64d3c88769d2d3058c57498 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Tue, 30 Apr 2024 18:39:18 +0530 Subject: [PATCH] void --- desktop/src/main/menu.ts | 12 +++++++----- desktop/src/main/services/app-update.ts | 2 +- desktop/src/main/stream.ts | 10 +++++----- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/desktop/src/main/menu.ts b/desktop/src/main/menu.ts index 5dd2b335e..1019c7a8f 100644 --- a/desktop/src/main/menu.ts +++ b/desktop/src/main/menu.ts @@ -30,7 +30,7 @@ export const createApplicationMenu = async (mainWindow: BrowserWindow) => { const handleCheckForUpdates = () => forceCheckForAppUpdates(mainWindow); const handleViewChangelog = () => - shell.openExternal( + void shell.openExternal( "https://github.com/ente-io/ente/blob/main/desktop/CHANGELOG.md", ); @@ -46,13 +46,15 @@ export const createApplicationMenu = async (mainWindow: BrowserWindow) => { shouldHideDockIcon = !shouldHideDockIcon; }; - const handleHelp = () => shell.openExternal("https://help.ente.io/photos/"); + const handleHelp = () => + void shell.openExternal("https://help.ente.io/photos/"); - const handleSupport = () => shell.openExternal("mailto:support@ente.io"); + const handleSupport = () => + void shell.openExternal("mailto:support@ente.io"); - const handleBlog = () => shell.openExternal("https://ente.io/blog/"); + const handleBlog = () => void shell.openExternal("https://ente.io/blog/"); - const handleViewLogs = openLogDirectory; + const handleViewLogs = () => void openLogDirectory(); return Menu.buildFromTemplate([ { diff --git a/desktop/src/main/services/app-update.ts b/desktop/src/main/services/app-update.ts index a9e310934..bc4bd38d6 100644 --- a/desktop/src/main/services/app-update.ts +++ b/desktop/src/main/services/app-update.ts @@ -12,7 +12,7 @@ export const setupAutoUpdater = (mainWindow: BrowserWindow) => { autoUpdater.autoDownload = false; const oneDay = 1 * 24 * 60 * 60 * 1000; - setInterval(() => checkForUpdatesAndNotify(mainWindow), oneDay); + setInterval(() => void checkForUpdatesAndNotify(mainWindow), oneDay); void checkForUpdatesAndNotify(mainWindow); }; diff --git a/desktop/src/main/stream.ts b/desktop/src/main/stream.ts index b97900659..3e27de12b 100644 --- a/desktop/src/main/stream.ts +++ b/desktop/src/main/stream.ts @@ -117,7 +117,7 @@ const handleReadZip = async (zipPath: string, entryName: string) => { // Close the zip handle when the underlying stream closes. // TODO(MR): Verify - stream.on("end", () => zip.close()); + stream.on("end", () => void zip.close()); return new Response(webReadableStream, { headers: { @@ -173,17 +173,17 @@ export const writeStream = (filePath: string, readableStream: ReadableStream) => const writeNodeStream = async (filePath: string, fileStream: Readable) => { const writeable = createWriteStream(filePath); - fileStream.on("error", (error) => { - writeable.destroy(error); // Close the writable stream with an error + fileStream.on("error", (err) => { + writeable.destroy(err); // Close the writable stream with an error }); fileStream.pipe(writeable); await new Promise((resolve, reject) => { writeable.on("finish", resolve); - writeable.on("error", async (err: Error) => { + writeable.on("error", (err) => { if (existsSync(filePath)) { - await fs.unlink(filePath); + void fs.unlink(filePath); } reject(err); });