Skip to content

Commit d05b5d8

Browse files
committed
JSON Lighthouse config
1 parent 4995d5d commit d05b5d8

File tree

2 files changed

+118
-70
lines changed

2 files changed

+118
-70
lines changed

lighthouserc.cjs

Lines changed: 0 additions & 70 deletions
This file was deleted.

lighthouserc.json

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
{
2+
"ci": {
3+
"collect": {
4+
"staticDistDir": "./dist",
5+
"numberOfRuns": 3,
6+
"settings": {
7+
"formFactor": "desktop",
8+
"throttling": {
9+
"rttMs": 40,
10+
"throughputKbps": 300000,
11+
"cpuSlowdownMultiplier": 1,
12+
"requestLatencyMs": 0,
13+
"downloadThroughputKbps": 0,
14+
"uploadThroughputKbps": 0
15+
},
16+
"screenEmulation": {
17+
"mobile": false,
18+
"width": 1920,
19+
"height": 1080,
20+
"deviceScaleFactor": 1,
21+
"disabled": false
22+
},
23+
"gatherMode": "navigation",
24+
"onlyCategories": [
25+
"performance",
26+
"accessibility",
27+
"best-practices",
28+
"seo"
29+
]
30+
}
31+
},
32+
"assert": {
33+
"assertions": {
34+
"categories:performance": [
35+
"error",
36+
{
37+
"minScore": 0.9
38+
}
39+
],
40+
"categories:accessibility": [
41+
"error",
42+
{
43+
"minScore": 0.9
44+
}
45+
],
46+
"categories:best-practices": [
47+
"error",
48+
{
49+
"minScore": 0.9
50+
}
51+
],
52+
"categories:seo": [
53+
"error",
54+
{
55+
"minScore": 0.9
56+
}
57+
],
58+
"resource-summary:document:size": [
59+
"warn",
60+
{
61+
"maxNumericValue": 100000
62+
}
63+
],
64+
"resource-summary:script:size": [
65+
"warn",
66+
{
67+
"maxNumericValue": 500000
68+
}
69+
],
70+
"resource-summary:stylesheet:size": [
71+
"warn",
72+
{
73+
"maxNumericValue": 50000
74+
}
75+
],
76+
"resource-summary:total:size": [
77+
"warn",
78+
{
79+
"maxNumericValue": 3500000
80+
}
81+
],
82+
"largest-contentful-paint": [
83+
"warn",
84+
{
85+
"maxNumericValue": 4000
86+
}
87+
],
88+
"first-contentful-paint": [
89+
"warn",
90+
{
91+
"maxNumericValue": 2500
92+
}
93+
],
94+
"cumulative-layout-shift": [
95+
"warn",
96+
{
97+
"maxNumericValue": 0.1
98+
}
99+
],
100+
"total-blocking-time": [
101+
"warn",
102+
{
103+
"maxNumericValue": 400
104+
}
105+
],
106+
"viewport": "error",
107+
"color-contrast": "error",
108+
"heading-order": "warn",
109+
"meta-description": "warn",
110+
"document-title": "warn",
111+
"is-on-https": "off"
112+
}
113+
},
114+
"upload": {
115+
"target": "temporary-public-storage"
116+
}
117+
}
118+
}

0 commit comments

Comments
 (0)