@codelaw/rules-html 0.1.0 → 0.2.0
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 +5 -1
- package/codelaw-pack.toml +1 -1
- package/corpus.toml +76 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @codelaw/rules-html · codelaw-rules-html
|
|
2
2
|
|
|
3
|
-
codelaw's rules for HTML — one of the
|
|
3
|
+
codelaw's rules for HTML — one of the first-party rule packs
|
|
4
4
|
([SR-RULE-PACKS](../../records/0101_rule-packs.md)). The same files ship on npm
|
|
5
5
|
as `@codelaw/rules-html` and on PyPI as `codelaw-rules-html`.
|
|
6
6
|
|
|
@@ -12,6 +12,8 @@ preview = true # every rule is `preview` until a corpus run promotes it
|
|
|
12
12
|
|
|
13
13
|
## Presets
|
|
14
14
|
|
|
15
|
+
<!-- docs-sync:presets -->
|
|
16
|
+
|
|
15
17
|
| preset | rules | ported from |
|
|
16
18
|
|---|---|---|
|
|
17
19
|
| `html/recommended` | 64 | html-validate 11.16.4 `html-validate:recommended`, without its layout rules and without the cosmetic rules its `prettier` and `browser` presets switch off (see below) |
|
|
@@ -19,6 +21,8 @@ preview = true # every rule is `preview` until a corpus run promotes it
|
|
|
19
21
|
| `html/document` | 5 | html-validate 11.16.4 `html-validate:document`: checks that only make sense for a complete page |
|
|
20
22
|
| `html/conventions` | 3 | opt-in: the starter rule `html/target-blank-rel`, and HTMLHint's `inline-style-disabled` and `inline-script-disabled` |
|
|
21
23
|
|
|
24
|
+
<!-- /docs-sync:presets -->
|
|
25
|
+
|
|
22
26
|
`html/a11y` is a subset of `html/recommended`, as upstream; turn it on alone
|
|
23
27
|
for an accessibility-only check. `html/document` adds to `html/recommended`.
|
|
24
28
|
|
package/codelaw-pack.toml
CHANGED
package/corpus.toml
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# `codelaw test --corpus` finding counts (SR-RULE-AUTHORING decision 4).
|
|
2
|
+
# Rewrite with --update-snapshot, and review the change.
|
|
3
|
+
|
|
4
|
+
[findings]
|
|
5
|
+
"html/area-alt" = 0
|
|
6
|
+
"html/aria-hidden-body" = 0
|
|
7
|
+
"html/aria-label-misuse" = 0
|
|
8
|
+
"html/attribute-allowed-values" = 6
|
|
9
|
+
"html/attribute-misuse" = 0
|
|
10
|
+
"html/autocomplete-password" = 3
|
|
11
|
+
"html/button-type" = 4
|
|
12
|
+
"html/close-attr" = 0
|
|
13
|
+
"html/close-order" = 6
|
|
14
|
+
"html/deprecated" = 4
|
|
15
|
+
"html/doctype-html" = 0
|
|
16
|
+
"html/element-name" = 0
|
|
17
|
+
"html/element-permitted-content" = 26
|
|
18
|
+
"html/element-permitted-occurrences" = 0
|
|
19
|
+
"html/element-permitted-order" = 0
|
|
20
|
+
"html/element-permitted-parent" = 0
|
|
21
|
+
"html/element-required-ancestor" = 0
|
|
22
|
+
"html/element-required-attributes" = 6
|
|
23
|
+
"html/element-required-content" = 0
|
|
24
|
+
"html/empty-heading" = 0
|
|
25
|
+
"html/empty-title" = 2
|
|
26
|
+
"html/fieldset-legend" = 4
|
|
27
|
+
"html/form-dup-name" = 0
|
|
28
|
+
"html/form-submit" = 0
|
|
29
|
+
"html/heading-level" = 41
|
|
30
|
+
"html/hidden-focusable" = 0
|
|
31
|
+
"html/img-alt" = 3
|
|
32
|
+
"html/img-title" = 0
|
|
33
|
+
"html/input-attributes" = 0
|
|
34
|
+
"html/input-image-alt" = 0
|
|
35
|
+
"html/input-missing-label" = 5
|
|
36
|
+
"html/link-text" = 3
|
|
37
|
+
"html/long-title" = 1
|
|
38
|
+
"html/map-dup-name" = 0
|
|
39
|
+
"html/map-id-name" = 0
|
|
40
|
+
"html/meta-refresh" = 0
|
|
41
|
+
"html/missing-doctype" = 1
|
|
42
|
+
"html/multiple-labeled-controls" = 0
|
|
43
|
+
"html/no-abstract-role" = 0
|
|
44
|
+
"html/no-autoplay" = 0
|
|
45
|
+
"html/no-conditional-comment" = 0
|
|
46
|
+
"html/no-deprecated-attr" = 1
|
|
47
|
+
"html/no-dup-attr" = 39
|
|
48
|
+
"html/no-dup-class" = 0
|
|
49
|
+
"html/no-duplicate-id" = 3
|
|
50
|
+
"html/no-implicit-close" = 15
|
|
51
|
+
"html/no-implicit-input-type" = 6
|
|
52
|
+
"html/no-inline-script" = 1
|
|
53
|
+
"html/no-inline-style" = 5
|
|
54
|
+
"html/no-missing-references" = 8
|
|
55
|
+
"html/no-multiple-main" = 0
|
|
56
|
+
"html/no-raw-characters" = 0
|
|
57
|
+
"html/no-redundant-aria-label" = 0
|
|
58
|
+
"html/no-redundant-for" = 0
|
|
59
|
+
"html/no-redundant-role" = 0
|
|
60
|
+
"html/no-utf8-bom" = 0
|
|
61
|
+
"html/prefer-button" = 19
|
|
62
|
+
"html/prefer-native-element" = 22
|
|
63
|
+
"html/prefer-tbody" = 3
|
|
64
|
+
"html/require-sri" = 9
|
|
65
|
+
"html/script-element" = 0
|
|
66
|
+
"html/script-type" = 0
|
|
67
|
+
"html/target-blank-rel" = 12
|
|
68
|
+
"html/tel-non-breaking" = 0
|
|
69
|
+
"html/text-content" = 0
|
|
70
|
+
"html/th-scope" = 0
|
|
71
|
+
"html/unique-landmark" = 5
|
|
72
|
+
"html/unrecognized-char-ref" = 0
|
|
73
|
+
"html/valid-autocomplete" = 0
|
|
74
|
+
"html/valid-for" = 0
|
|
75
|
+
"html/valid-id" = 0
|
|
76
|
+
"html/void-content" = 0
|