ESLint: Enable @typescript-eslint/return-await rule

This ensures stack traces are helpful at the cost of a slightly
lower performance (one more tick in the event loop).

Fixes #838

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2021-02-20 20:14:36 +01:00
parent 6a6dc7ea21
commit 6ffeb2e9c9
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
8 changed files with 26 additions and 20 deletions

View file

@ -46,7 +46,7 @@ export class FilesystemBackend implements MediaBackend {
async deleteFile(fileName: string, _: BackendData): Promise<void> {
const filePath = this.getFilePath(fileName);
try {
return fs.unlink(filePath);
return await fs.unlink(filePath);
} catch (e) {
this.logger.error(e.message, e.stack, 'deleteFile');
throw new MediaBackendError(`Could not delete '${filePath}'`);