-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlighthouserc.js
More file actions
74 lines (68 loc) · 2.16 KB
/
Copy pathlighthouserc.js
File metadata and controls
74 lines (68 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/**
* Lighthouse CI Configuration
* Phase 7: Performance Testing
*/
module.exports = {
ci: {
collect: {
numberOfRuns: 3,
startServerCommand: 'npm run preview',
startServerReadyPattern: 'Local',
startServerReadyTimeout: 30000,
url: [
'http://localhost:4173/',
'http://localhost:4173/games',
'http://localhost:4173/dashboards',
'http://localhost:4173/upload',
],
settings: {
preset: 'desktop',
// Skip some audits that don't apply to SPAs
skipAudits: [
'uses-http2',
'uses-long-cache-ttl',
],
},
},
assert: {
preset: 'lighthouse:recommended',
assertions: {
// Performance
'first-contentful-paint': ['warn', { maxNumericValue: 2000 }],
'largest-contentful-paint': ['warn', { maxNumericValue: 4000 }],
'cumulative-layout-shift': ['error', { maxNumericValue: 0.1 }],
'total-blocking-time': ['warn', { maxNumericValue: 500 }],
'speed-index': ['warn', { maxNumericValue: 4000 }],
// Best Practices
'errors-in-console': ['warn', { maxLength: 0 }],
'no-vulnerable-libraries': ['error', { minScore: 1 }],
'csp-xss': 'off', // Not applicable to local dev
'inspector-issues': 'off',
// Accessibility
'color-contrast': ['warn', { minScore: 0.9 }],
'heading-order': 'warn',
'link-name': 'warn',
'button-name': 'warn',
'image-alt': 'warn',
// SEO (less critical for app)
'meta-description': 'off',
'document-title': 'warn',
// PWA (optional for now)
'installable-manifest': 'off',
'service-worker': 'off',
'splash-screen': 'off',
'themed-omnibox': 'off',
'maskable-icon': 'off',
'apple-touch-icon': 'off',
// Categories
'categories:performance': ['warn', { minScore: 0.7 }],
'categories:accessibility': ['warn', { minScore: 0.8 }],
'categories:best-practices': ['warn', { minScore: 0.8 }],
'categories:seo': 'off',
},
},
upload: {
target: 'temporary-public-storage',
},
},
};