-
Notifications
You must be signed in to change notification settings - Fork 3
/
lighthouserc.js
81 lines (73 loc) · 2.81 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/*
* For details on the Lighthouse CI configuration API, see:
* https://github.com/GoogleChrome/lighthouse-ci/blob/master/docs/configuration.md
*/
module.exports = {
ci: {
collect: {
staticDistDir: "./public",
// if new page types are added to the site, they must be added here also
url: [
"/",
"/about/",
"/issues/",
"/issues/1/",
"/issues/1/data-beyond-vision/",
"/issues/4/",
"/issues/4/sonorous-medieval/",
"/issues/4/toward-deep-map/",
"/authors/",
"/404.html"
]
},
assert: {
preset: "lighthouse:no-pwa",
assertions: {
/* Can't find an explicit mapping from mailures to IDs.
However, in the Lighthouse interface, the div's ID is the key.
A list of SOME tests:
https://github.com/GoogleChrome/lighthouse-ci/blob/72107f3bf462ab60596f576967ff1a5e0aad622b/packages/utils/src/presets/all.js
IDs are also available in GH Actions output. */
/* color contrast check reports incorrect results on issue page and
on 404 page footer due to the way content is actually rendered; so
we switch it to a warning */
"color-contrast": "warn",
/* 3rd-party fonts included by e.g. sketchfab don't use font-display,
so we have to switch it to a warning */
"font-display": "warn",
// some tap target warnings (adjacent DOIs, author/about links in footer)
"tap-targets": "warn",
// flagging an outdated aria role in footnotes generated by hugo/goldmark;
// already resolved in goldmark https://github.com/yuin/goldmark/issues/258
// should be resolved in hugo at some point
"aria-required-children": "warn",
// switch misc. performance issues to warnings until they are resolved
"unsized-images": "warn",
"uses-responsive-images": "warn",
"offscreen-images": "warn",
"uses-rel-preconnect": "warn",
"uses-passive-event-listeners": "warn",
"uses-optimized-images": "warn",
"unused-javascript": "warn",
"unused-css-rules": "warn",
"total-byte-weight": "warn",
"uses-webp-images": "warn",
// kaltura errors to ignore
"errors-in-console": "warn",
"no-document-write": "warn",
"uses-text-compression": "warn",
// backward-forward cache
"bf-cache": "warn",
// ensure CSP is effective against XSS attacks
// no warning in lighthouse report, maybe not checking?
"csp-xss": "warn",
// error specific to external asset in SW4 Budak/Rominger piece;
// remove once we remove that article from urls to check with lighthouse
"inspector-issues": "warn",
}
},
upload: {
target: "temporary-public-storage",
},
},
};