-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.hintrc
More file actions
236 lines (236 loc) · 7.07 KB
/
.hintrc
File metadata and controls
236 lines (236 loc) · 7.07 KB
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
/**
* Webhint does not support workspaces; the configuration file must be in root.
* https://github.com/webhintio/hint/issues/3651
*/
{
// "$schema": "https://raw.githubusercontent.com/webhintio/hint/main/packages/hint/src/lib/config/config-schema.json",
"connector": {
"name": "./dist/utils/webhint-puppeteer-connector.js"
/*
Enable and configure options when they're confirmed not to crash.
"options": {
"headless": true,
"ignoreHTTPSErrors": false,
"puppeteerOptions": {
"detached": true,
"dumpio": true
},
"waitUntil": "networkidle0"
}
*/
},
"extends": [
"accessibility",
"development",
"progressive-web-apps",
"web-recommended"
],
"formatters": [
"codeframe",
"./dist/utils/webhint-html-formatter.js",
"./dist/utils/webhint-json-formatter.js",
// "stylish", // This is just a worse version of `codeframe`.
"summary"
],
"hints": {
"apple-touch-icons": "error",
"axe/aria": "off",
"axe/color": [
"error",
// https://webhint.io/docs/user-guide/hints/hint-axe/color/
[
"link-in-text-block"
]
],
"axe/forms": [
"error",
// https://webhint.io/docs/user-guide/hints/hint-axe/forms/#additional-rules-off-by-default
[
"label-title-only"
]
],
"axe/keyboard": "off",
"axe/language": "error",
"axe/name-role-value": [
"error",
// https://webhint.io/docs/user-guide/hints/hint-axe/name-role-value/#additional-rules-off-by-default
[
"empty-heading"
]
],
"axe/parsing": "error",
"axe/semantics": [
"error",
// https://webhint.io/docs/user-guide/hints/hint-axe/semantics/#additional-rules-off-by-default
[
"heading-order",
"label-content-name-mismatch",
"landmark-banner-is-top-level",
"landmark-complementary-is-top-level",
"landmark-contentinfo-is-top-level",
"landmark-main-is-top-level",
"landmark-no-duplicate-banner",
"landmark-no-duplicate-contentinfo",
"landmark-no-duplicate-main",
"landmark-one-main",
"landmark-unique",
"p-as-heading",
"page-has-heading-one"
]
],
"axe/sensory-and-visual-cues": [
"error",
// https://webhint.io/docs/user-guide/hints/hint-axe/sensory-and-visual-cues/#additional-rules-off-by-default
[
"meta-viewport",
"meta-viewport-large"
]
],
"axe/structure": [
"error",
// https://webhint.io/docs/user-guide/hints/hint-axe/structure/#additional-rules-off-by-default
[
"css-orientation-lock",
"frame-tested",
"hidden-content"
]
],
"axe/tables": [
"error",
// https://webhint.io/docs/user-guide/hints/hint-axe/tables/#additional-rules-off-by-default
[
"scope-attr-valid",
"table-duplicate-name",
"table-fake-caption",
"td-has-header"
]
],
"axe/text-alternatives": [
"error",
// https://webhint.io/docs/user-guide/hints/hint-axe/text-alternatives/#additional-rules-off-by-default
[
"frame-title-unique",
"image-redundant-alt",
"svg-img-alt"
]
],
"axe/time-and-media": [
"error",
// https://webhint.io/docs/user-guide/hints/hint-axe/time-and-media/#additional-rules-off-by-default
[
"no-autoplay-audio"
]
],
"babel-config/is-valid": "error",
"button-type": "error",
"compat-api/css": [
"error",
{
"ignore": [
"backdrop-filter",
"text-size-adjust: none"
]
}
],
"compat-api/html": [
"error",
{
"ignore": [
"meta[name=theme-color]",
"search"
]
}
],
"content-type": "error",
"create-element-svg": "error",
"css-prefix-order": "error",
"detect-css-reflows/composite": "error",
"detect-css-reflows/layout": "error",
"detect-css-reflows/paint": "error",
"disown-opener": "error",
"doctype": "off",
"highest-available-document-mode": "error",
"html-checker": "off",
"http-cache": "error",
"http-compression": "error",
// TODO: Reenable this once the Microsoft Edge Tools VS Code extension can find the dependency.
// "https-only": "error",
// Env: webhint_hints_image-optimization-cloudinary_1_apiSecret
"image-optimization-cloudinary": "off",
"leading-dot-classlist": "error",
"manifest-app-name": "error",
"manifest-exists": "error",
"manifest-file-extension": "error",
"manifest-is-valid": "error",
"meta-charset-utf-8": "error",
/**
* Webhint incorrectly flags multiple theme colors.
* https://github.com/webhintio/hint/issues/6001
*/
"meta-theme-color": "off",
"meta-viewport": "error",
// TODO: Reenable this once the Microsoft Edge Tools VS Code extension can find the dependency.
// "minified-js": "error",
"no-bom": "error",
// TODO: Reenable this once the Microsoft Edge Tools VS Code extension can find the dependency.
// "no-broken-links": "error",
"no-disallowed-headers": "error",
"no-friendly-error-pages": "error",
"no-html-only-headers": "error",
"no-http-redirects": "error",
// Inline styles are beneficial when an elements has ~1 unique property.
"no-inline-styles": "off",
// TODO: Reenable this once the Microsoft Edge Tools VS Code extension can find the dependency.
// "no-p3p": "error",
"no-protocol-relative-urls": "error",
"no-vulnerable-javascript-libraries": "error",
// TODO: Reenable this once the Microsoft Edge Tools VS Code extension can find the dependency.
// "performance-budget": "error",
"scoped-svg-styles": "error",
"sri": [
"error",
{
"originCriteria": "all"
}
],
"ssllabs": "error",
"strict-transport-security": "error",
"stylesheet-limit": "off",
"typescript-config/import-helpers": "error",
/**
* TypeScript already handles configuration file validation. Webhint's
* validation contains inaccuracies, like "generateCpuProfile, mapRoot,
* sourceRoot, and tsBuildInfoFile must be 'string'" despite `null` being a
* valid value.
*/
"typescript-config/is-valid": "off",
/**
* Removing comments as part of a separate minification step is
* recommended instead. https://github.com/webhintio/hint/issues/4839
*/
"typescript-config/no-comments": "off",
"typescript-config/strict": "error",
"typescript-config/target": "error",
"validate-set-cookie-header": "error",
"webpack-config/config-exists": "off",
"webpack-config/is-installed": "off",
"webpack-config/is-valid": "error",
"webpack-config/module-esnext-typescript": "error",
"webpack-config/modules-false-babel": "error",
"webpack-config/no-devtool-in-prod": "error",
"x-content-type-options": "error"
},
"parsers": [
"babel-config",
"css",
"html",
"javascript",
"jsx",
"manifest",
"package-json",
"sass",
"typescript",
"typescript-config",
"webpack-config"
]
}