diff --git a/packages/core/src/resolveConfig.ts b/packages/core/src/resolveConfig.ts index 03f1fbbc..81c4e4b8 100644 --- a/packages/core/src/resolveConfig.ts +++ b/packages/core/src/resolveConfig.ts @@ -42,10 +42,15 @@ export const resolveUserConfig: (userConfig: UserConfig) => Promise config.lighthouseOptions.onlyCategories.includes(column)) + if (config.lighthouseOptions.onlyAudits?.length) { + logger.warn('You have specified both `onlyCategories` and `onlyAudits`. `onlyCategories` will be ignored.') + config.lighthouseOptions.onlyCategories = [] + } + else { + // restrict categories values and copy order of columns from the default config + config.lighthouseOptions.onlyCategories = defaultConfig.lighthouseOptions.onlyCategories + .filter(column => config.lighthouseOptions.onlyCategories.includes(column)) + } } } else {