style: add @typescript-eslint/return-await rule (#9612)

This commit is contained in:
Brooooooklyn
2025-01-09 09:28:58 +00:00
parent 6d29f80894
commit fed0156f22
5 changed files with 14 additions and 15 deletions

View File

@@ -91,7 +91,7 @@ async function resizeImage(blob: Blob | File): Promise<Blob | null> {
if (ctx) {
ctx.imageSmoothingQuality = 'high';
ctx.drawImage(img, 0, 0, canvas.width, canvas.height);
return new Promise(resolve =>
return await new Promise(resolve =>
canvas.toBlob(blob => resolve(blob), 'image/jpeg', 0.8)
);
}