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 616f963b8e
commit 208ff1d039
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
8 changed files with 25 additions and 19 deletions

View file

@ -227,7 +227,7 @@ const authSchema = Joi.object({
.optional(),
});
export default registerAs('authConfig', async () => {
export default registerAs('authConfig', () => {
// ToDo: Validate these with Joi to prevent duplicate entries?
const gitlabNames = toArrayConfig(
process.env.HD_AUTH_GITLABS,
@ -367,7 +367,7 @@ export default registerAs('authConfig', async () => {
},
);
if (authConfig.error) {
const errorMessages = await authConfig.error.details
const errorMessages = authConfig.error.details
.map((detail) => detail.message)
.map((error) => {
error = replaceAuthErrorsWithEnvironmentVariables(
@ -398,5 +398,5 @@ export default registerAs('authConfig', async () => {
});
throw new Error(buildErrorMessage(errorMessages));
}
return authConfig.value;
return authConfig.value as AuthConfig;
});