Switch to double quotes and reformat codebase with Biome

This commit is contained in:
Mohamed Boudra
2026-03-21 20:22:15 +07:00
parent ab40786882
commit f6579dbeb4
805 changed files with 38132 additions and 40175 deletions
+2 -4
View File
@@ -122,9 +122,7 @@ export async function readManagedFileBase64(input: { path?: unknown }): Promise<
return bytes.toString("base64");
}
export async function deleteManagedAttachmentFile(input: {
path?: unknown;
}): Promise<boolean> {
export async function deleteManagedAttachmentFile(input: { path?: unknown }): Promise<boolean> {
const filePath = resolveManagedAttachmentPath(input.path);
await rm(filePath, { force: true });
return true;
@@ -139,7 +137,7 @@ export async function garbageCollectManagedAttachmentFiles(input: {
input.referencedIds
.filter((value): value is string => typeof value === "string")
.map((value) => value.trim())
.filter((value) => ATTACHMENT_ID_PATTERN.test(value))
.filter((value) => ATTACHMENT_ID_PATTERN.test(value)),
)
: new Set<string>();
@@ -96,7 +96,9 @@ export async function checkForAppUpdate(currentVersion: string): Promise<AppUpda
}
}
export async function downloadAndInstallUpdate(currentVersion: string): Promise<AppUpdateInstallResult> {
export async function downloadAndInstallUpdate(
currentVersion: string,
): Promise<AppUpdateInstallResult> {
if (!app.isPackaged) {
return {
installed: false,
+2 -1
View File
@@ -19,7 +19,8 @@ export function registerDialogHandlers(): void {
ipcMain.handle("paseo:dialog:ask", async (event, message: string, options?: AskOptions) => {
const win = BrowserWindow.fromWebContents(event.sender);
const result = await dialog.showMessageBox(win ?? BrowserWindow.getFocusedWindow()!, {
type: options?.kind === "warning" ? "warning" : options?.kind === "error" ? "error" : "question",
type:
options?.kind === "warning" ? "warning" : options?.kind === "error" ? "error" : "question",
title: options?.title ?? "Confirm",
message,
buttons: [options?.cancelLabel ?? "Cancel", options?.okLabel ?? "OK"],
+1 -1
View File
@@ -1,7 +1,7 @@
import { app, Menu, BrowserWindow } from "electron";
function withBrowserWindow(
callback: (win: BrowserWindow) => void
callback: (win: BrowserWindow) => void,
): (_item: Electron.MenuItem, baseWin: Electron.BaseWindow | undefined) => void {
return (_item, baseWin) => {
const win = baseWin instanceof BrowserWindow ? baseWin : BrowserWindow.getFocusedWindow();