chore: eslint 10 (#26490)

This commit is contained in:
Daniel Dietzler
2026-02-24 14:24:18 +01:00
committed by GitHub
parent 30f6d4439e
commit 55ee9f76da
22 changed files with 195 additions and 179 deletions

View File

@@ -185,7 +185,7 @@ const getEnv = (): EnvData => {
try {
redisConfig = JSON.parse(Buffer.from(redisUrl.slice(10), 'base64').toString());
} catch (error) {
throw new Error(`Failed to decode redis options: ${error}`);
throw new Error('Failed to decode redis options', { cause: error });
}
}

View File

@@ -69,7 +69,7 @@ export class ServerInfoRepository {
return response.json();
} catch (error) {
throw new Error(`Failed to fetch GitHub release: ${error}`);
throw new Error('Failed to fetch GitHub release', { cause: error });
}
}

View File

@@ -169,7 +169,7 @@ export class MetadataService extends BaseService {
this.logger.log(`Initialized local reverse geocoder`);
} catch (error: Error | any) {
this.logger.error(`Unable to initialize reverse geocoding: ${error}`, error?.stack);
throw new Error(`Metadata service init failed`);
throw new Error('Metadata service init failed', { cause: error });
}
}

View File

@@ -59,7 +59,7 @@ export class NotificationAdminService extends BaseService {
async getTemplate(name: EmailTemplate, customTemplate: string) {
const { server, templates } = await this.getConfig({ withCache: false });
let templateResponse = '';
let templateResponse: string;
switch (name) {
case EmailTemplate.WELCOME: {

View File

@@ -134,7 +134,7 @@ export class NotificationService extends BaseService {
}
} catch (error: Error | any) {
this.logger.error(`Failed to validate SMTP configuration: ${error}`, error?.stack);
throw new Error(`Invalid SMTP configuration: ${error}`);
throw new Error('Invalid SMTP configuration', { cause: error });
}
}

View File

@@ -125,7 +125,7 @@ export class StorageTemplateService extends BaseService {
});
} catch (error) {
this.logger.warn(`Storage template validation failed: ${JSON.stringify(error)}`);
throw new Error(`Invalid storage template: ${error}`);
throw new Error('Invalid storage template', { cause: error });
}
}