Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type errors in unlighthouse.config.ts file when upgrading to v0.15.0 #262

Closed
brendanHearX opened this issue Feb 18, 2025 · 1 comment
Closed

Comments

@brendanHearX
Copy link

Describe the bug

Hi. I'm seeing 2 type errors in unlighthouse.config.ts file when upgrading to v0.15.0.

The docs show that these properties are supported.

Why are these errors being thrown?

unlighthouse.config.ts:

import { defineConfig } from 'unlighthouse';

export default defineConfig({
  scanner: { throttle: false },
  ci: { budget: { seo: 60, accessibility: 85, performance: 50, 'best-practices': 60 } },
});

Terminal:

Error: unlighthouse.config.ts(4,3): error TS2740: Type '{ throttle: false; }' is missing the following properties from type '{ customSampling: Record<string, RouteDefinition>; ignoreI18nPages: boolean; maxRoutes: number | false; include?: (string | RegExp)[] | undefined; ... 9 more ...; _robotsTxtRules?: any; }': customSampling, ignoreI18nPages, maxRoutes, skipJavascript, and 6 more.
Error: unlighthouse.config.ts(6,3): error TS273[9](https://github.com/hearSmart/website-lexie/actions/runs/13376420443/job/37356584711?pr=3262#step:7:10): Type '{ budget: { seo: number; accessibility: number; performance: number; 'best-practices': number; }; }' is missing the following properties from type '{ budget: number | Record<Partial<LighthouseCategories>, number>; buildStatic: boolean; reporter: false | ValidReportTypes; reporterConfig?: ReporterConfig | undefined; }': buildStatic, reporter
Error: Process completed with exit code 2.

Screenshots:

scanner ci
Image Image

Reproduction

No response

System / Nuxt Info

@harlan-zw
Copy link
Owner

Fixed in v0.16.0, please see this PR for details on updated config guidelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants