Fix various ESLint errors in configs

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2021-02-24 20:29:39 +01:00
parent b37b2d1047
commit c5fb87de05
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
8 changed files with 25 additions and 19 deletions

View file

@ -25,7 +25,7 @@ const schema = Joi.object({
.label('HD_LOGLEVEL'),
});
export default registerAs('appConfig', async () => {
export default registerAs('appConfig', () => {
const appConfig = schema.validate(
{
domain: process.env.HD_DOMAIN,
@ -38,10 +38,10 @@ export default registerAs('appConfig', async () => {
},
);
if (appConfig.error) {
const errorMessages = await appConfig.error.details.map(
const errorMessages = appConfig.error.details.map(
(detail) => detail.message,
);
throw new Error(buildErrorMessage(errorMessages));
}
return appConfig.value;
return appConfig.value as AppConfig;
});