forked from thunderbird/thunderbolt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlighthouserc.js
More file actions
37 lines (36 loc) · 1.44 KB
/
lighthouserc.js
File metadata and controls
37 lines (36 loc) · 1.44 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
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/** @type {import('@lhci/types').LHCI.UserConfig} */
module.exports = {
ci: {
collect: {
numberOfRuns: 3,
settings: {
// Skip audits that aren't relevant for an SPA behind auth
skipAudits: ['redirects-http', 'is-crawlable'],
},
},
upload: {
// Temporary public storage — no server needed.
// Results are available for ~7 days at the printed URL.
target: 'temporary-public-storage',
},
assert: {
// Informational only — log warnings but never fail CI.
preset: 'lighthouse:recommended',
assertions: {
// Override every category to warn-only so CI stays green.
'categories:performance': ['warn', { minScore: 0.8 }],
'categories:accessibility': ['warn', { minScore: 0.9 }],
'categories:best-practices': ['warn', { minScore: 0.9 }],
'categories:seo': ['warn', { minScore: 0.8 }],
// Key web vitals — warn thresholds only.
'first-contentful-paint': ['warn', { maxNumericValue: 2000 }],
'largest-contentful-paint': ['warn', { maxNumericValue: 2500 }],
'total-blocking-time': ['warn', { maxNumericValue: 300 }],
'cumulative-layout-shift': ['warn', { maxNumericValue: 0.1 }],
},
},
},
}