forked from Princeton-CDH/startwords
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlighthouserc.js
73 lines (67 loc) · 2.51 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
/*
* 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/3/",
"/issues/3/mapping-latent-spaces/",
"/issues/3/on-spanish-parrots/",
"/es/issues/3/on-spanish-parrots/",
"/issues/3/llm-limit-case/",
"/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"
}
},
upload: {
target: "temporary-public-storage",
},
},
};