Misc linting fixes.

This commit is contained in:
Patrick Fic
2025-03-19 13:52:49 -07:00
parent 3277af73f6
commit e67309ed4d
12 changed files with 36 additions and 30 deletions

View File

@@ -3,11 +3,11 @@ import log from "electron-log/main";
import _ from "lodash";
import Store from "../store/store";
const SettingsWatchedFilePathsAdd = async (event: IpcMainInvokeEvent) => {
const SettingsWatchedFilePathsAdd = async (): Promise<string[]> => {
const mainWindow = BrowserWindow.getAllWindows()[0]; //TODO: Filter to only main window once a proper key has been set.
if (!mainWindow) {
log.error("No main window found when trying to open dialog");
return;
return [];
}
const result = await dialog.showOpenDialog(mainWindow, {
properties: ["openDirectory"],
@@ -25,7 +25,7 @@ const SettingsWatchedFilePathsAdd = async (event: IpcMainInvokeEvent) => {
const SettingsWatchedFilePathsRemove = async (
event: IpcMainInvokeEvent,
path: string
) => {
): Promise<string[]> => {
Store.set(
"settings.filepaths",
_.without(Store.get("settings.filepaths"), path)
@@ -34,8 +34,8 @@ const SettingsWatchedFilePathsRemove = async (
return Store.get("settings.filepaths");
};
const SettingsWatchedFilePathsGet = async (event: IpcMainInvokeEvent) => {
const filepaths = Store.get("settings.filepaths");
const SettingsWatchedFilePathsGet = async (): Promise<string[]> => {
const filepaths: string[] = Store.get("settings.filepaths") || [];
return filepaths;
};