-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.lighthouserc.js
37 lines (37 loc) · 1.7 KB
/
.lighthouserc.js
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
module.exports = {
ci: {
collect: {
settings: {
// Fix the CI failure with error "Unable to connect to chrome".
// See: https://github.com/GoogleChrome/lighthouse-ci/issues/802
hostname: "127.0.0.1",
// Source the form factor from an environment variable set in the CI run
formFactor: process.env.EMULATE_DEVICE || "mobile",
screenEmulation: {
mobile: !(process.env.EMULATE_DEVICE === "desktop")
},
// Do not apply any throttling
throttlingMethod: "provided",
// Skipping "uses-http2" due to errors with reports see: http2 https://github.com/GoogleChrome/lighthouse/issues/6539
// Skipping "is-crawlable" because Netlify's preview preview for PRs add `x-robots-tag: noindex`
// Skipping "service-worker" because the service worker is disabled on deploy previews.
// Skipping "works-offline" and "offline-start-url" because the service worker is disabled on deploy previews.
skipAudits: [
"uses-http2",
"is-crawlable",
"service-worker",
"offline-start-url",
"works-offline"
]
}
},
assert: {
assertions: {
"categories:performance": ["error", { minScore: 0.9 }],
"categories:accessibility": ["error", { minScore: 1 }],
"categories:best-practices": ["error", { minScore: 1 }],
"categories:seo": ["error", { minScore: 1 }]
}
}
}
};