Unawaited promises

This commit is contained in:
Manav Rathi 2024-04-30 17:43:30 +05:30
parent d308d334f8
commit 82316ff290
No known key found for this signature in database
4 changed files with 5 additions and 5 deletions

View file

@ -29,6 +29,6 @@ module.exports = {
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-confusing-void-expression": "off",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-floating-promises": "off",
// "@typescript-eslint/no-floating-promises": "off",
},
};

View file

@ -35,7 +35,7 @@ export const createApplicationMenu = async (mainWindow: BrowserWindow) => {
);
const toggleAutoLaunch = () => {
autoLauncher.toggleAutoLaunch();
void autoLauncher.toggleAutoLaunch();
isAutoLaunchEnabled = !isAutoLaunchEnabled;
};

View file

@ -20,7 +20,7 @@ export const listZipItems = async (zipPath: string): Promise<ZipItem[]> => {
}
}
zip.close();
await zip.close();
return entryNames.map((entryName) => [zipPath, entryName]);
};
@ -40,7 +40,7 @@ export const pathOrZipItemSize = async (
`An entry with name ${entryName} does not exist in the zip file at ${zipPath}`,
);
const size = entry.size;
zip.close();
await zip.close();
return size;
}
};

View file

@ -114,7 +114,7 @@ export const makeFileForDataOrPathOrZipItem = async (
const [zipPath, entryName] = dataOrPathOrZipItem;
const zip = new StreamZip.async({ file: zipPath });
await zip.extract(entryName, path);
zip.close();
await zip.close();
};
}
}