forked from GoogleChrome/developer.chrome.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lighthouserc.js
52 lines (47 loc) · 1.5 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
module.exports = {
ci: {
upload: {
target: 'temporary-public-storage',
},
collect: {
startServerCommand: 'npm start',
startServerTimeout: 60 * 1000, // allow our build to take 60s
url: [
'http://localhost:8080/',
'http://localhost:8080/blog/',
'http://localhost:8080/docs/',
'http://localhost:8080/docs/extensions/',
],
},
assert: {
// @see https://github.com/GoogleChrome/lighthouse-ci/blob/master/docs/configuration.md#preset
preset: 'lighthouse:no-pwa',
assertions: {
'categories:performance': ['error', {minScore: 0.9}],
/**
* Canonical URL will not match the domain while being tested.
*/
canonical: 'off',
/**
* Disable until #71 is fixed.
*/
'tap-targets': 'off',
/**
* Gtag and GTM cause the unused-javascript audit to fail, but out of our control.
* So only error if over 2 resources cause this audit to fail
*/
'unused-javascript': ['error', {maxLength: 2}],
/**
* We don't care about preconnect to Analytics and friends.
*/
'uses-rel-preconnect': 'off',
/**
* For now, we allow a single resource with a long cache TTL: Analytics, whose 2h TTL
* raises the ire of this assertion.
* (This was always a warning, but we can hide it for now.)
*/
'uses-long-cache-ttl': ['warn', {maxLength: 1}],
},
},
},
};