-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.lighthouserc.js
164 lines (159 loc) · 5.23 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
const assertions = {
// Not useful or invisible diagnostic audits (off)
'full-page-screenshot': ['off', {}],
'critical-request-chains': ['off', {}],
'final-screenshot': ['off', {}],
'js-libraries': ['off', {}],
'largest-contentful-paint-element': ['off', {}],
'layout-shift-elements': ['off', {}],
'main-thread-tasks': ['off', {}],
'network-requests': ['off', {}],
'network-rtt': ['off', {}],
'network-server-latency': ['off', {}],
'resource-summary': ['off', {}],
'screenshot-thumbnails': ['off', {}],
'script-treemap-data': ['off', {}],
'third-party-summary': ['off', {}],
'total-blocking-time': ['off', {}],
'user-timings': ['off', {}],
diagnostics: ['off', {}],
metrics: ['off', {}],
// All the rest of the audits (warn)
'aria-allowed-attr': ['warn', {}],
'aria-command-name': ['warn', {}],
'aria-hidden-body': ['warn', {}],
'aria-hidden-focus': ['warn', {}],
'aria-input-field-name': ['warn', {}],
'aria-meter-name': ['warn', {}],
'aria-progressbar-name': ['warn', {}],
'aria-required-attr': ['warn', {}],
'aria-required-children': ['warn', {}],
'aria-required-parent': ['warn', {}],
'aria-roles': ['warn', {}],
'aria-toggle-field-name': ['warn', {}],
'aria-tooltip-name': ['warn', {}],
'aria-treeitem-name': ['warn', {}],
'aria-valid-attr': ['warn', {}],
'aria-valid-attr-value': ['warn', {}],
'bootup-time': ['warn', {}],
'button-name': ['warn', {}],
'color-contrast': ['warn', {}],
'crawlable-anchors': ['warn', {}],
'csp-xss': ['warn', {}],
'cumulative-layout-shift': ['warn', {}],
'definition-list': ['warn', {}],
'document-title': ['warn', {}],
'dom-size': ['warn', {}],
'duplicate-id-active': ['warn', {}],
'duplicate-id-aria': ['warn', {}],
'duplicated-javascript': ['warn', {}],
'efficient-animated-content': ['warn', {}],
'errors-in-console': ['warn', {}],
'first-contentful-paint': ['warn', {}],
'first-meaningful-paint': ['warn', {}],
'font-display': ['warn', {}],
'font-size': ['warn', {}],
'form-field-multiple-labels': ['warn', {}],
'frame-title': ['warn', {}],
'geolocation-on-start': ['warn', {}],
'heading-order': ['warn', {}],
'html-has-lang': ['warn', {}],
'html-lang-valid': ['warn', {}],
'http-status-code': ['warn', {}],
'image-alt': ['warn', {}],
'image-aspect-ratio': ['warn', {}],
'image-size-responsive': ['warn', {}],
'input-image-alt': ['warn', {}],
'inspector-issues': ['warn', {}],
'is-crawlable': ['warn', {}],
'largest-contentful-paint': ['warn', {}],
'lcp-lazy-loaded': ['warn', {}],
'legacy-javascript': ['warn', {}],
'link-name': ['warn', {}],
'link-text': ['warn', {}],
'long-tasks': ['warn', {}],
'mainthread-work-breakdown': ['warn', {}],
'max-potential-fid': ['warn', {}],
'meta-description': ['warn', {}],
'meta-refresh': ['warn', {}],
'meta-viewport': ['warn', {}],
'modern-image-formats': ['warn', {}],
'no-document-write': ['warn', {}],
'no-unload-listeners': ['warn', {}],
'no-vulnerable-libraries': ['warn', {}],
'non-composited-animations': ['warn', {}],
'notification-on-start': ['warn', {}],
'object-alt': ['warn', {}],
'offscreen-images': ['warn', {}],
'password-inputs-can-be-pasted-into': ['warn', {}],
'performance-budget': ['warn', {}],
'preload-fonts': ['warn', {}],
'preload-lcp-image': ['warn', {}],
'render-blocking-resources': ['warn', {}],
'robots-txt': ['warn', {}],
'server-response-time': ['warn', {}],
'speed-index': ['warn', {}],
'tap-targets': ['warn', {}],
'td-headers-attr': ['warn', {}],
'th-has-data-cells': ['warn', {}],
'third-party-facades': ['warn', {}],
'timing-budget': ['warn', {}],
'total-byte-weight': ['warn', {}],
'unminified-css': ['warn', {}],
'unminified-javascript': ['warn', {}],
'unsized-images': ['warn', {}],
'unused-css-rules': ['warn', {}],
'unused-javascript': ['warn', {}],
'uses-http2': ['warn', {}],
'uses-long-cache-ttl': ['warn', {}],
'uses-optimized-images': ['warn', {}],
'uses-passive-event-listeners': ['warn', {}],
'uses-rel-preconnect': ['warn', {}],
'uses-rel-preload': ['warn', {}],
'uses-responsive-images': ['warn', {}],
'uses-text-compression': ['warn', {}],
'valid-lang': ['warn', {}],
'valid-source-maps': ['warn', {}],
'video-caption': ['warn', {}],
accesskeys: ['warn', {}],
bypass: ['warn', {}],
canonical: ['warn', {}],
charset: ['warn', {}],
deprecations: ['warn', {}],
dlitem: ['warn', {}],
doctype: ['warn', {}],
hreflang: ['warn', {}],
interactive: ['warn', {}],
label: ['warn', {}],
list: ['warn', {}],
listitem: ['warn', {}],
plugins: ['warn', {}],
redirects: ['warn', {}],
tabindex: ['warn', {}],
// every PWA audit is disabled
'apple-touch-icon': ['off', {}],
'content-width': ['off', {}],
'installable-manifest': ['off', {}],
'is-on-https': ['off', {}],
'maskable-icon': ['off', {}],
'themed-omnibox': ['off', {}],
'service-worker': ['off', {}],
'splash-screen': ['off', {}],
viewport: ['off', {}]
}
const assert = {
assertions
}
const collect = {
chromePath: '/opt/hostedtoolcache/chromium/latest/x64/chrome',
startServerCommand:
'npm run serve:lhci',
startServerReadyPattern: 'listening',
settings: {chromeFlags: ['--disable-gpu', '--no-sandbox', '-no-zygote']}
}
module.exports = {
ci: {
assert,
collect
}
}