diff --git a/lib/workers/global/index.ts b/lib/workers/global/index.ts index 0ef5d1c870d29f7fd2e96b3583dacc0e7950fb40..488be90108dfd7abbcfa142ee3cdbe90b17e4c15 100644 --- a/lib/workers/global/index.ts +++ b/lib/workers/global/index.ts @@ -96,10 +96,11 @@ export async function validatePresets(config: AllConfig): Promise<void> { export async function resolveGlobalExtends( globalExtends: string[], + ignorePresets?: string[], ): Promise<AllConfig> { try { // Make a "fake" config to pass to resolveConfigPresets and resolve globalPresets - const config = { extends: globalExtends }; + const config = { extends: globalExtends, ignorePresets }; const resolvedConfig = await resolveConfigPresets(config); return resolvedConfig; } catch (err) { @@ -133,10 +134,13 @@ export async function start(): Promise<number> { await instrument('config', async () => { // read global config from file, env and cli args config = await getGlobalConfig(); - if (config?.globalExtends) { + if (is.nonEmptyArray(config?.globalExtends)) { // resolve global presets immediately config = mergeChildConfig( - await resolveGlobalExtends(config.globalExtends), + await resolveGlobalExtends( + config.globalExtends, + config.ignorePresets, + ), config, ); }