ci: Add lint rule for mandatory curly braces (#9348)

This commit is contained in:
Manuel
2024-10-16 19:57:42 +02:00
committed by GitHub
parent 714acaa906
commit dfd5a8edbf
22 changed files with 145 additions and 137 deletions

View File

@@ -80,7 +80,7 @@ export class DefinedSchemas {
logger.info('Running Migrations Completed');
} catch (e) {
logger.error(`Failed to run migrations: ${e}`);
if (process.env.NODE_ENV === 'production') process.exit(1);
if (process.env.NODE_ENV === 'production') { process.exit(1); }
}
}
@@ -108,7 +108,7 @@ export class DefinedSchemas {
this.checkForMissingSchemas();
await this.enforceCLPForNonProvidedClass();
} catch (e) {
if (timeout) clearTimeout(timeout);
if (timeout) { clearTimeout(timeout); }
if (this.retries < this.maxRetries) {
this.retries++;
// first retry 1sec, 2sec, 3sec total 6sec retry sequence
@@ -118,7 +118,7 @@ export class DefinedSchemas {
await this.executeMigrations();
} else {
logger.error(`Failed to run migrations: ${e}`);
if (process.env.NODE_ENV === 'production') process.exit(1);
if (process.env.NODE_ENV === 'production') { process.exit(1); }
}
}
}
@@ -428,7 +428,7 @@ export class DefinedSchemas {
const keysB: string[] = Object.keys(objB);
// Check key name
if (keysA.length !== keysB.length) return false;
if (keysA.length !== keysB.length) { return false; }
return keysA.every(k => objA[k] === objB[k]);
}