Skip to content

Commit

Permalink
apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
RahulGautamSingh committed May 2, 2024
1 parent d2bc770 commit 3f6c837
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/config/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ function isGlobalOption(key: string): boolean {
}

function initOptions(): void {
if (optionsInitialized) {
return;
}

optionParents = {};
optionInherits = new Set();
optionTypes = {};
Expand Down Expand Up @@ -160,9 +164,7 @@ export async function validateConfig(
isPreset?: boolean,
parentPath?: string,
): Promise<ValidationResult> {
if (!optionsInitialized) {
initOptions();
}
initOptions();

let errors: ValidationMessage[] = [];
let warnings: ValidationMessage[] = [];
Expand Down

0 comments on commit 3f6c837

Please sign in to comment.