/** * Lighthouse CI Configuration * v0.14.0 TASK-STAG-003: Validation Lighthouse * * Targets: * Performance >= 85 * Accessibility >= 90 * PWA >= 90 (best-practices proxy when PWA not applicable) * Best Practices >= 85 * SEO >= 80 */ module.exports = { ci: { collect: { url: [ `${process.env.STAGING_URL || 'https://staging.veza.app'}/login`, `${process.env.STAGING_URL || 'https://staging.veza.app'}/register`, ], numberOfRuns: 3, settings: { preset: 'desktop', // Throttling: simulate cable connection throttling: { cpuSlowdownMultiplier: 1, downloadThroughputKbps: 10240, uploadThroughputKbps: 5120, rttMs: 40, }, // Skip audits that require auth skipAudits: [ 'uses-http2', // Depends on server config ], }, }, assert: { assertions: { // Performance >= 85 'categories:performance': ['error', { minScore: 0.85 }], // Accessibility >= 90 'categories:accessibility': ['error', { minScore: 0.90 }], // Best Practices >= 85 'categories:best-practices': ['warn', { minScore: 0.85 }], // SEO >= 80 'categories:seo': ['warn', { minScore: 0.80 }], // Core Web Vitals 'first-contentful-paint': ['warn', { maxNumericValue: 1800 }], 'largest-contentful-paint': ['warn', { maxNumericValue: 2500 }], 'cumulative-layout-shift': ['error', { maxNumericValue: 0.1 }], 'total-blocking-time': ['warn', { maxNumericValue: 300 }], // Accessibility specifics (ORIGIN_UI_UX_SYSTEM compliance) 'color-contrast': 'error', 'image-alt': 'error', 'label': 'error', 'button-name': 'error', 'link-name': 'error', 'document-title': 'error', 'html-has-lang': 'error', 'meta-viewport': 'error', }, }, upload: { target: 'filesystem', outputDir: '.lighthouseci', }, }, };