rintenki 0.14.0 → 0.14.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -2
- package/package.json +1 -1
- package/rintenki.darwin-arm64.node +0 -0
- package/rintenki.linux-x64-gnu.node +0 -0
- package/rintenki.win32-x64-msvc.node +0 -0
- package/rintenkirc.schema.json +125 -0
package/README.md
CHANGED
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
A fast HTML linter powered by [html5ever](https://github.com/servo/html5ever) + [napi-rs](https://napi.rs/).
|
|
4
4
|
|
|
5
|
+
**[Documentation](https://rintenki.dev)**
|
|
6
|
+
|
|
5
7
|
The name "rintenki" comes from the Japanese word "輪転機" (rintenki), meaning a rotary printing press. Like a rotary press that rapidly inspects and produces printed pages, rintenki quickly scans and checks your HTML.
|
|
6
8
|
|
|
7
9
|
## Features
|
|
8
10
|
|
|
9
|
-
-
|
|
11
|
+
- 103 built-in rules based on the [HTML Living Standard](https://html.spec.whatwg.org/)
|
|
10
12
|
- Rust-powered parsing via html5ever with Node.js bindings
|
|
11
13
|
- CLI with `--fix`, `--watch`, `--format json/sarif`
|
|
12
14
|
- VS Code extension with real-time linting, Quick Fix, and status bar
|
|
@@ -111,7 +113,7 @@ Parsers are auto-detected from installed packages, or configured explicitly:
|
|
|
111
113
|
|
|
112
114
|
## Rules
|
|
113
115
|
|
|
114
|
-
|
|
116
|
+
103 rules across 5 categories. Rules marked with a wrench (🔧) are auto-fixable with `--fix`.
|
|
115
117
|
|
|
116
118
|
### Conformance Checking
|
|
117
119
|
|
|
@@ -120,12 +122,14 @@ Parsers are auto-detected from installed packages, or configured explicitly:
|
|
|
120
122
|
| `attr-duplication` | error | Detect duplicate attributes |
|
|
121
123
|
| `attr-value-quotes` 🔧 | warning | Detect unquoted attribute values |
|
|
122
124
|
| `colspan-rowspan-range` | error | Validate colspan (1-1000) and rowspan (0-65534) ranges |
|
|
125
|
+
| `dfn-no-dfn-descendants` | error | Disallow dfn nested inside another dfn |
|
|
123
126
|
| `deprecated-attr` | error | Detect deprecated attributes |
|
|
124
127
|
| `deprecated-element` | error | Detect deprecated elements |
|
|
125
128
|
| `disallowed-element` | off | Detect disallowed elements |
|
|
126
129
|
| `doctype` 🔧 | error | Require DOCTYPE declaration |
|
|
127
130
|
| `empty-title` | error | Detect empty title element |
|
|
128
131
|
| `end-tag` | warning | Detect missing end tags |
|
|
132
|
+
| `figcaption-position` | warning | Require figcaption as first or last child of figure |
|
|
129
133
|
| `form-dup-name` | warning | Detect duplicate form control names |
|
|
130
134
|
| `header-footer-nesting` | error | Detect header/footer/main nesting inside header or footer |
|
|
131
135
|
| `heading-levels` | error | Detect skipped heading levels |
|
|
@@ -134,11 +138,13 @@ Parsers are auto-detected from installed packages, or configured explicitly:
|
|
|
134
138
|
| `invalid-attr` | error | Detect attributes not in the spec |
|
|
135
139
|
| `link-constraints` | error | Validate link element attribute constraints |
|
|
136
140
|
| `meta-constraints` | error | Validate meta element attribute constraints |
|
|
141
|
+
| `no-empty-track-label` | warning | Disallow empty label on track elements |
|
|
137
142
|
| `no-duplicate-base` | error | Detect multiple base or title elements |
|
|
138
143
|
| `no-duplicate-dt` | error | Detect duplicate dt names in dl |
|
|
139
144
|
| `no-duplicate-in-head` | error | Detect duplicate charset/viewport/description meta |
|
|
140
145
|
| `no-empty-palpable-content` | warning | Detect empty palpable content elements |
|
|
141
146
|
| `no-implicit-button-type` | warning | Require explicit type on button |
|
|
147
|
+
| `no-autoplay-media` | warning | Detect autoplay without muted on video/audio |
|
|
142
148
|
| `no-nested-forms` | error | Detect nested form elements |
|
|
143
149
|
| `no-nested-interactive` | error | Detect interactive content inside a or button |
|
|
144
150
|
| `no-non-scalable-viewport` | error | Detect user-scalable=no in viewport meta |
|
|
@@ -161,7 +167,14 @@ Parsers are auto-detected from installed packages, or configured explicitly:
|
|
|
161
167
|
| `valid-autocomplete` | warning | Validate autocomplete attribute values |
|
|
162
168
|
| `valid-id` | error | Require valid id values (non-empty, no whitespace) |
|
|
163
169
|
| `valid-rel` | error | Validate rel attribute values |
|
|
170
|
+
| `track-has-srclang` | error | Require srclang on subtitles track |
|
|
164
171
|
| `void-content` | error | Detect content inside void elements |
|
|
172
|
+
| `no-duplicate-track` | error | Detect duplicate track elements with same kind/srclang/label |
|
|
173
|
+
| `no-multiple-default-track` | error | Detect multiple default tracks in the same category |
|
|
174
|
+
| `base-before-urls` | warning | Require base href before elements with URL attributes |
|
|
175
|
+
| `address-content-model` | error | Detect heading/sectioning/header/footer inside address |
|
|
176
|
+
| `link-rel-or-itemprop` | error | Require rel or itemprop on link elements |
|
|
177
|
+
| `base-has-href-or-target` | error | Require href or target on base element |
|
|
165
178
|
|
|
166
179
|
### Accessibility
|
|
167
180
|
|
|
@@ -173,13 +186,16 @@ Parsers are auto-detected from installed packages, or configured explicitly:
|
|
|
173
186
|
| `aria-naming-prohibited` | error | Detect aria-label on naming-prohibited elements |
|
|
174
187
|
| `aria-role-conflicts` | warning | Detect conflicts between explicit and implicit role |
|
|
175
188
|
| `empty-heading` | warning | Detect empty heading elements |
|
|
189
|
+
| `fieldset-has-legend` | warning | Require legend in fieldset |
|
|
176
190
|
| `label-has-control` | error | Detect label without associated control |
|
|
177
191
|
| `landmark-roles` | warning | Detect nested landmark roles |
|
|
192
|
+
| `media-has-captions` | warning | Require captions/subtitles track on video |
|
|
178
193
|
| `neighbor-popovers` | off | Detect non-adjacent popover triggers and targets |
|
|
179
194
|
| `no-abstract-role` | error | Detect abstract ARIA roles |
|
|
180
195
|
| `no-ambiguous-navigable-target-names` | warning | Detect invalid target name keywords |
|
|
181
196
|
| `no-aria-hidden-body` | error | Detect aria-hidden on body element |
|
|
182
197
|
| `no-consecutive-br` | warning | Detect consecutive br elements |
|
|
198
|
+
| `no-duplicate-landmark` | warning | Require aria-label on duplicate landmarks |
|
|
183
199
|
| `no-dup-class` | warning | Detect duplicate class names |
|
|
184
200
|
| `no-positive-tabindex` | warning | Detect positive tabindex values |
|
|
185
201
|
| `no-redundant-role` | warning | Detect redundant explicit ARIA roles |
|
|
@@ -187,9 +203,15 @@ Parsers are auto-detected from installed packages, or configured explicitly:
|
|
|
187
203
|
| `no-role-on-meta-elements` | error | Detect role/aria-* on meta elements |
|
|
188
204
|
| `require-accessible-name` | error | Require accessible name on interactive elements |
|
|
189
205
|
| `required-h1` | error | Require h1 element |
|
|
206
|
+
| `table-has-caption` | warning | Require caption on data tables |
|
|
190
207
|
| `table-row-column-alignment` | warning | Detect inconsistent table column counts |
|
|
191
208
|
| `use-list` | warning | Suggest list elements for bullet-prefixed text |
|
|
192
209
|
| `wai-aria` | error | Validate WAI-ARIA roles and attributes |
|
|
210
|
+
| `no-aria-disabled-link` | warning | Detect aria-disabled on anchor with href |
|
|
211
|
+
| `no-generic-role` | warning | Detect explicit role="generic" |
|
|
212
|
+
| `no-aria-checked-mismatch` 🔧 | warning | Detect aria-checked on checkbox/radio with checked |
|
|
213
|
+
| `th-has-scope` | warning | Require scope on th elements |
|
|
214
|
+
| `no-duplicate-accesskey` | warning | Detect duplicate accesskey values |
|
|
193
215
|
|
|
194
216
|
### Naming Convention
|
|
195
217
|
|
|
@@ -203,7 +225,10 @@ Parsers are auto-detected from installed packages, or configured explicitly:
|
|
|
203
225
|
|------|---------|-------------|
|
|
204
226
|
| `no-hard-code-id` | off | Detect hardcoded id attributes |
|
|
205
227
|
| `no-inline-style` | warning | Detect inline style attributes |
|
|
228
|
+
| `no-javascript-url` | error | Detect javascript: URLs |
|
|
229
|
+
| `no-obsolete-doctype` 🔧 | warning | Detect legacy XHTML/HTML4 doctypes |
|
|
206
230
|
| `no-use-event-handler-attr` | warning | Detect event handler attributes |
|
|
231
|
+
| `no-form-without-action` | warning | Detect form without action attribute |
|
|
207
232
|
|
|
208
233
|
### Style
|
|
209
234
|
|
|
@@ -215,6 +240,8 @@ Parsers are auto-detected from installed packages, or configured explicitly:
|
|
|
215
240
|
| `ineffective-attr` | warning | Detect attributes with no effect |
|
|
216
241
|
| `no-boolean-attr-value` 🔧 | warning | Detect values on boolean attributes |
|
|
217
242
|
| `no-default-value` 🔧 | warning | Detect attributes set to their default value |
|
|
243
|
+
| `no-target-blank-without-rel` 🔧 | warning | Require rel="noopener" on target="_blank" |
|
|
244
|
+
| `prefer-native-over-aria` | warning | Prefer native HTML elements over ARIA roles |
|
|
218
245
|
|
|
219
246
|
## Packages
|
|
220
247
|
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/rintenkirc.schema.json
CHANGED
|
@@ -68,6 +68,11 @@
|
|
|
68
68
|
"description": "Enforce class name conventions (opt-in)",
|
|
69
69
|
"default": "off"
|
|
70
70
|
},
|
|
71
|
+
"dfn-no-dfn-descendants": {
|
|
72
|
+
"$ref": "#/definitions/severity",
|
|
73
|
+
"description": "Disallow dfn nested inside another dfn",
|
|
74
|
+
"default": "error"
|
|
75
|
+
},
|
|
71
76
|
"deprecated-attr": {
|
|
72
77
|
"$ref": "#/definitions/severity",
|
|
73
78
|
"description": "Disallow deprecated HTML attributes",
|
|
@@ -103,6 +108,16 @@
|
|
|
103
108
|
"description": "Require closing tags for non-void elements",
|
|
104
109
|
"default": "warning"
|
|
105
110
|
},
|
|
111
|
+
"figcaption-position": {
|
|
112
|
+
"$ref": "#/definitions/severity",
|
|
113
|
+
"description": "Require figcaption to be the first or last child of figure",
|
|
114
|
+
"default": "warning"
|
|
115
|
+
},
|
|
116
|
+
"fieldset-has-legend": {
|
|
117
|
+
"$ref": "#/definitions/severity",
|
|
118
|
+
"description": "Require legend element in fieldset",
|
|
119
|
+
"default": "warning"
|
|
120
|
+
},
|
|
106
121
|
"form-dup-name": {
|
|
107
122
|
"$ref": "#/definitions/severity",
|
|
108
123
|
"description": "Detect duplicate form control names within a form",
|
|
@@ -138,6 +153,11 @@
|
|
|
138
153
|
"description": "Disallow non-standard attributes",
|
|
139
154
|
"default": "error"
|
|
140
155
|
},
|
|
156
|
+
"media-has-captions": {
|
|
157
|
+
"$ref": "#/definitions/severity",
|
|
158
|
+
"description": "Require captions or subtitles track on video elements",
|
|
159
|
+
"default": "warning"
|
|
160
|
+
},
|
|
141
161
|
"meta-constraints": {
|
|
142
162
|
"$ref": "#/definitions/severity",
|
|
143
163
|
"description": "Validate meta element attribute constraints",
|
|
@@ -168,6 +188,11 @@
|
|
|
168
188
|
"description": "Disallow abstract ARIA roles",
|
|
169
189
|
"default": "error"
|
|
170
190
|
},
|
|
191
|
+
"no-autoplay-media": {
|
|
192
|
+
"$ref": "#/definitions/severity",
|
|
193
|
+
"description": "Detect autoplay without muted on video/audio elements",
|
|
194
|
+
"default": "warning"
|
|
195
|
+
},
|
|
171
196
|
"no-aria-hidden-body": {
|
|
172
197
|
"$ref": "#/definitions/severity",
|
|
173
198
|
"description": "Disallow aria-hidden on body element",
|
|
@@ -198,6 +223,11 @@
|
|
|
198
223
|
"description": "Disallow default attribute values (auto-fixable)",
|
|
199
224
|
"default": "warning"
|
|
200
225
|
},
|
|
226
|
+
"no-duplicate-landmark": {
|
|
227
|
+
"$ref": "#/definitions/severity",
|
|
228
|
+
"description": "Require aria-label on duplicate landmarks",
|
|
229
|
+
"default": "warning"
|
|
230
|
+
},
|
|
201
231
|
"no-duplicate-in-head": {
|
|
202
232
|
"$ref": "#/definitions/severity",
|
|
203
233
|
"description": "Disallow duplicate charset, viewport, or description meta elements",
|
|
@@ -213,16 +243,31 @@
|
|
|
213
243
|
"description": "Disallow duplicate dt elements in a dl",
|
|
214
244
|
"default": "error"
|
|
215
245
|
},
|
|
246
|
+
"no-empty-track-label": {
|
|
247
|
+
"$ref": "#/definitions/severity",
|
|
248
|
+
"description": "Disallow empty label attribute on track elements",
|
|
249
|
+
"default": "warning"
|
|
250
|
+
},
|
|
216
251
|
"no-empty-palpable-content": {
|
|
217
252
|
"$ref": "#/definitions/severity",
|
|
218
253
|
"description": "Disallow empty interactive or palpable content elements",
|
|
219
254
|
"default": "warning"
|
|
220
255
|
},
|
|
256
|
+
"no-javascript-url": {
|
|
257
|
+
"$ref": "#/definitions/severity",
|
|
258
|
+
"description": "Detect javascript: URLs in href attributes",
|
|
259
|
+
"default": "error"
|
|
260
|
+
},
|
|
221
261
|
"no-hard-code-id": {
|
|
222
262
|
"$ref": "#/definitions/severity",
|
|
223
263
|
"description": "Disallow hardcoded id attributes (opt-in)",
|
|
224
264
|
"default": "off"
|
|
225
265
|
},
|
|
266
|
+
"no-obsolete-doctype": {
|
|
267
|
+
"$ref": "#/definitions/severity",
|
|
268
|
+
"description": "Detect legacy XHTML/HTML4 doctypes",
|
|
269
|
+
"default": "warning"
|
|
270
|
+
},
|
|
226
271
|
"no-nested-forms": {
|
|
227
272
|
"$ref": "#/definitions/severity",
|
|
228
273
|
"description": "Disallow nested form elements",
|
|
@@ -248,6 +293,11 @@
|
|
|
248
293
|
"description": "Disallow user-scalable=no or maximum-scale=1 in viewport meta",
|
|
249
294
|
"default": "error"
|
|
250
295
|
},
|
|
296
|
+
"no-target-blank-without-rel": {
|
|
297
|
+
"$ref": "#/definitions/severity",
|
|
298
|
+
"description": "Require rel=\"noopener\" on target=\"_blank\" anchors",
|
|
299
|
+
"default": "warning"
|
|
300
|
+
},
|
|
251
301
|
"no-orphaned-end-tag": {
|
|
252
302
|
"$ref": "#/definitions/severity",
|
|
253
303
|
"description": "Disallow unmatched closing tags",
|
|
@@ -348,6 +398,11 @@
|
|
|
348
398
|
"description": "Require summary to be the first child of details",
|
|
349
399
|
"default": "error"
|
|
350
400
|
},
|
|
401
|
+
"table-has-caption": {
|
|
402
|
+
"$ref": "#/definitions/severity",
|
|
403
|
+
"description": "Require caption element on data tables",
|
|
404
|
+
"default": "warning"
|
|
405
|
+
},
|
|
351
406
|
"table-row-column-alignment": {
|
|
352
407
|
"$ref": "#/definitions/severity",
|
|
353
408
|
"description": "Require consistent column counts in table rows",
|
|
@@ -358,6 +413,11 @@
|
|
|
358
413
|
"description": "Disallow header, footer, sectioning, and heading elements inside th",
|
|
359
414
|
"default": "error"
|
|
360
415
|
},
|
|
416
|
+
"track-has-srclang": {
|
|
417
|
+
"$ref": "#/definitions/severity",
|
|
418
|
+
"description": "Require srclang on subtitles track elements",
|
|
419
|
+
"default": "error"
|
|
420
|
+
},
|
|
361
421
|
"unique-main": {
|
|
362
422
|
"$ref": "#/definitions/severity",
|
|
363
423
|
"description": "Require at most one visible main element per document",
|
|
@@ -397,6 +457,71 @@
|
|
|
397
457
|
"$ref": "#/definitions/severity",
|
|
398
458
|
"description": "Validate WAI-ARIA roles and attributes",
|
|
399
459
|
"default": "error"
|
|
460
|
+
},
|
|
461
|
+
"no-duplicate-track": {
|
|
462
|
+
"$ref": "#/definitions/severity",
|
|
463
|
+
"description": "Disallow duplicate track elements with same kind, srclang, and label",
|
|
464
|
+
"default": "error"
|
|
465
|
+
},
|
|
466
|
+
"no-multiple-default-track": {
|
|
467
|
+
"$ref": "#/definitions/severity",
|
|
468
|
+
"description": "Disallow multiple default track elements in the same category",
|
|
469
|
+
"default": "error"
|
|
470
|
+
},
|
|
471
|
+
"base-before-urls": {
|
|
472
|
+
"$ref": "#/definitions/severity",
|
|
473
|
+
"description": "Require base href to appear before elements with URL attributes",
|
|
474
|
+
"default": "warning"
|
|
475
|
+
},
|
|
476
|
+
"address-content-model": {
|
|
477
|
+
"$ref": "#/definitions/severity",
|
|
478
|
+
"description": "Disallow heading, sectioning, header, footer, address inside address",
|
|
479
|
+
"default": "error"
|
|
480
|
+
},
|
|
481
|
+
"link-rel-or-itemprop": {
|
|
482
|
+
"$ref": "#/definitions/severity",
|
|
483
|
+
"description": "Require link to have rel or itemprop attribute",
|
|
484
|
+
"default": "error"
|
|
485
|
+
},
|
|
486
|
+
"base-has-href-or-target": {
|
|
487
|
+
"$ref": "#/definitions/severity",
|
|
488
|
+
"description": "Require base to have at least href or target attribute",
|
|
489
|
+
"default": "error"
|
|
490
|
+
},
|
|
491
|
+
"no-aria-disabled-link": {
|
|
492
|
+
"$ref": "#/definitions/severity",
|
|
493
|
+
"description": "Disallow aria-disabled on anchor elements with href",
|
|
494
|
+
"default": "warning"
|
|
495
|
+
},
|
|
496
|
+
"no-generic-role": {
|
|
497
|
+
"$ref": "#/definitions/severity",
|
|
498
|
+
"description": "Disallow explicit role=\"generic\"",
|
|
499
|
+
"default": "warning"
|
|
500
|
+
},
|
|
501
|
+
"no-aria-checked-mismatch": {
|
|
502
|
+
"$ref": "#/definitions/severity",
|
|
503
|
+
"description": "Disallow aria-checked on checkbox/radio with checked attribute",
|
|
504
|
+
"default": "warning"
|
|
505
|
+
},
|
|
506
|
+
"th-has-scope": {
|
|
507
|
+
"$ref": "#/definitions/severity",
|
|
508
|
+
"description": "Require scope attribute on th elements",
|
|
509
|
+
"default": "warning"
|
|
510
|
+
},
|
|
511
|
+
"prefer-native-over-aria": {
|
|
512
|
+
"$ref": "#/definitions/severity",
|
|
513
|
+
"description": "Prefer native HTML elements over ARIA roles",
|
|
514
|
+
"default": "warning"
|
|
515
|
+
},
|
|
516
|
+
"no-duplicate-accesskey": {
|
|
517
|
+
"$ref": "#/definitions/severity",
|
|
518
|
+
"description": "Disallow duplicate accesskey values in the document",
|
|
519
|
+
"default": "warning"
|
|
520
|
+
},
|
|
521
|
+
"no-form-without-action": {
|
|
522
|
+
"$ref": "#/definitions/severity",
|
|
523
|
+
"description": "Warn when form element has no action attribute",
|
|
524
|
+
"default": "warning"
|
|
400
525
|
}
|
|
401
526
|
},
|
|
402
527
|
"additionalProperties": {
|