Skip to content

Commit 1ed331b

Browse files
authored
HTMLHint: Add new rules and changes (SchemaStore#5171)
* Add new rules and changes - Added the `link-rel-canonical-require` rule - Added the `form-method-require` rule - Add `allow-non-blocking` option to `head-script-disabled`. - Corrected grammatical errors in descriptions for various attributes (The schema structure is valid for JSON Schema draft-04) * Update enum values for head-script-disabled rule
1 parent 9719c84 commit 1ed331b

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

src/schemas/json/htmlhint.json

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
"default": false
2424
},
2525
"attr-unsafe-chars": {
26-
"description": "Attribute value can't not use unsafe chars.",
26+
"description": "Attribute value cannot use unsafe chars.",
2727
"type": "boolean",
2828
"default": false
2929
},
3030
"attr-value-double-quotes": {
31-
"description": "Attribute value must closed by double quotes.",
31+
"description": "Attribute value must be closed by double quotes.",
3232
"type": "boolean",
3333
"default": false
3434
},
@@ -43,7 +43,7 @@
4343
"default": false
4444
},
4545
"attr-value-single-quotes": {
46-
"description": "Attribute value must closed by single quotes.",
46+
"description": "Attribute value must be closed by single quotes.",
4747
"type": "boolean",
4848
"default": false
4949
},
@@ -72,15 +72,20 @@
7272
"type": "boolean",
7373
"default": false
7474
},
75+
"form-method-require": {
76+
"description": "The method attribute of a form element must be present.",
77+
"type": "boolean",
78+
"default": false
79+
},
7580
"h1-require": {
7681
"description": "A H1 heading element is required in HTML documents.",
7782
"type": "boolean",
7883
"default": false
7984
},
8085
"head-script-disabled": {
81-
"description": "The script tag can not be used in head.",
82-
"type": "boolean",
83-
"default": false
86+
"description": "The script tag cannot be used in head.",
87+
"default": false,
88+
"enum": [false, true, "allow-non-blocking"]
8489
},
8590
"href-abs-or-rel": {
8691
"description": "Href must be absolute or relative.",
@@ -93,7 +98,7 @@
9398
"default": false
9499
},
95100
"id-class-ad-disabled": {
96-
"description": "Id and class can not use ad keyword, it will blocked by adblock software.",
101+
"description": "Id and class cannot use ad keyword, it will be blocked by adblock software.",
97102
"type": "boolean",
98103
"default": false
99104
},
@@ -117,6 +122,11 @@
117122
"type": "boolean",
118123
"default": false
119124
},
125+
"link-rel-canonical-require": {
126+
"description": "A link element with rel=\"canonical\" is required within the <head> tag.",
127+
"type": "boolean",
128+
"default": false
129+
},
120130
"main-require": {
121131
"description": "A main element is required within the <body> tag.",
122132
"type": "boolean",
@@ -138,7 +148,7 @@
138148
"default": false
139149
},
140150
"space-tab-mixed-disabled": {
141-
"description": "Spaces and tabs can not mixed in front of line.",
151+
"description": "Spaces and tabs cannot be mixed in front of line.",
142152
"default": false,
143153
"enum": [false, "space", "tab"]
144154
},
@@ -153,7 +163,7 @@
153163
"default": false
154164
},
155165
"style-disabled": {
156-
"description": "Style tag can not be used.",
166+
"description": "Style tag cannot be used.",
157167
"type": "boolean",
158168
"default": false
159169
},
@@ -168,7 +178,7 @@
168178
"default": false
169179
},
170180
"tag-self-close": {
171-
"description": "The empty tag must closed by self.",
181+
"description": "The empty tag must be self-closed.",
172182
"type": "boolean",
173183
"default": false
174184
},

0 commit comments

Comments
 (0)