-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathlighthouserc.yml
101 lines (101 loc) · 3.33 KB
/
lighthouserc.yml
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
---
ci:
collect:
# Puppeteer is used to login
puppeteerScript: puppeteer-script.js
puppeteerLaunchOptions:
args:
- '--no-sandbox'
- '--headless'
- '--ignore-certificate-errors'
numberOfRuns: 3
url:
- https://localhost:8443
startServerCommand: "cd .. && ./gradlew bootTestRun"
startServerReadyPattern: "Tomcat started on port"
startServerReadyTimeout: 600000
settings:
onlyCategories:
- accessibility
- best-practices
- performance
assert:
preset: lighthouse:recommended
assertions:
categories:performance:
- warn
# customize your threshold
- minScore: 0.5
- aggregationMethod: pessimistic
categories:accessibility:
- warn
# customize your threshold
- minScore: 0.5
- aggregationMethod: pessimistic
categories:best-practices:
- warn
# customize your threshold
- minScore: 0.5
- aggregationMethod: pessimistic
# for subcategories of the main audit categories above, adjust assertions as desired below (these arbitrary examples set subcategories to return warnings instead of errors):
# customize selected assertions for performance
bf-cache:
# Puppeteer disables the bfcache by default due to a bug where the page freezes. Puppeteer scripts won’t restore the page from bfcache even if real users would see the page restored from bfcache.
# See https://github.com/puppeteer/puppeteer/issues/8197
- "off"
aria-valid-attr-value:
- warn
button-name:
- warn
crawlable-anchors:
- warn
font-display:
- warn
# customize selected assertions for accessibility
landmark-one-main:
- warn
bypass:
- warn
# customize selected assertions for best-practices
total-byte-weight:
- warn
duplicate-id-active:
- warn
unused-javascript:
- warn
valid-source-maps:
- warn
uses-passive-event-listeners:
- warn
# for categories not audited, turn off all assertions (turning off the audit does not turn off the assertions):
# turn off all assertions for seo
viewport: 'off'
meta-description: 'off'
http-status-code: 'off'
link-text: 'off'
document-title: 'off'
is-crawlable: 'off'
robots-txt: 'off'
image-alt: 'off'
hreflang: 'off'
canonical: 'off'
font-size: 'off'
plugins: 'off'
tap-targets: 'off'
# turn off all assertions for pwa
load-fast-enough-for-pwa: 'off'
works-offline: 'off'
offline-start-url: 'off'
is-on-https: 'off'
service-worker: 'off'
installable-manifest: 'off'
redirects-http: 'off'
splash-screen: 'off'
themed-omnibox: 'off'
content-width: 'off'
without-javascript: 'off'
apple-touch-icon: 'off'
# Note: there is some overlap of assertion auditRef ids between categories; turning off in one turns off in all; e.g. viewport is turned off for both seo and pwa above.
maskable-icon: 'off'
# csp-xss is too strict as of lighthouse 8.0.0, such as requiring report-uri. Will probably be fixed in a future version. See https://github.com/GoogleChrome/lighthouse/issues/12804
csp-xss: 'off'