Skip to content
Snippets Groups Projects
Unverified Commit 0a60dc1d authored by Gabriel-Ladzaretti's avatar Gabriel-Ladzaretti Committed by GitHub
Browse files

feat: apply `ignorePresets` when resolving the `globalExtends` array (#32845)

parent bd8a1874
No related branches found
No related tags found
No related merge requests found
......@@ -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,
);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment