1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-26 22:41:17 +02:00

Chore: Add no-throw-literal and prefer-promise-reject-errors eslint rules (#10371)

This commit is contained in:
Henry Heino
2024-04-25 05:32:37 -07:00
committed by GitHub
parent bce71a00e9
commit 0670ad92d7
7 changed files with 11 additions and 6 deletions

View File

@@ -164,7 +164,7 @@ export function execCommandWithPipes(executable: string, args: string[]) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
child.on('close', (code: any) => {
if (code !== 0) {
reject(`Ended with code ${code}`);
reject(new Error(`Ended with code ${code}`));
} else {
resolve(null);
}