chore: apply prettier on all files (#8)

* chore: apply prettier on all files

* chore: add prettier npm script

* Update .prettierrc

Co-authored-by: Axel Cocat <ax.cocat@gmail.com>

* Update .prettierignore

Co-authored-by: Axel Cocat <ax.cocat@gmail.com>

* Update .prettierignore

Co-authored-by: Axel Cocat <ax.cocat@gmail.com>

* Update .prettierignore

Co-authored-by: Axel Cocat <ax.cocat@gmail.com>

* chore: apply prettier with new conf

* Revert "chore: apply prettier with new conf"

This reverts commit db2a04c03f.

* chore: apply prettier correctly

* chore: update .prettierignore

* chore: restore viewer.min.js minification

* chore: apply again prettier

Co-authored-by: Stefano Borzi <stefano.borzi@fedex.com>
Co-authored-by: Axel Cocat <ax.cocat@gmail.com>
This commit is contained in:
Stefano Borzì 2022-05-06 19:35:26 +02:00 committed by GitHub
parent fe21209817
commit 8331e4dd73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 504 additions and 228 deletions

View file

@ -105,7 +105,7 @@ export class Config {
let i = 0;
while (true) {
const key = Config.getEnvKey(parentName + i);
const found = Object.keys(process.env).some(k => k.startsWith(key));
const found = Object.keys(process.env).some((k) => k.startsWith(key));
if (!found) {
break;
}
@ -131,10 +131,14 @@ export class Config {
}
private static getEnvKey(key: string): string {
return Config.envPrefix + "_" + key
.replace(/\./g, "__")
.replace(/[A-Z]/g, letter => `_${letter.toLowerCase()}`)
.toUpperCase();
return (
Config.envPrefix +
"_" +
key
.replace(/\./g, "__")
.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`)
.toUpperCase()
);
}
private static parseEnvValue(value: string, model: any): any {
@ -173,4 +177,4 @@ export class Config {
}
return missing;
}
};
}