@herb-tools/linter 0.9.1 → 0.9.2
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 +2 -2
- package/dist/herb-lint.js +26 -26
- package/dist/herb-lint.js.map +1 -1
- package/dist/index.cjs +9 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -16
- package/dist/index.js.map +1 -1
- package/dist/lint-worker.js +24 -24
- package/dist/lint-worker.js.map +1 -1
- package/dist/loader.cjs +17 -17
- package/dist/loader.cjs.map +1 -1
- package/dist/loader.js +17 -17
- package/dist/loader.js.map +1 -1
- package/dist/rules/rule-utils.js +1 -13
- package/dist/rules/rule-utils.js.map +1 -1
- package/dist/types/rules/rule-utils.d.ts +1 -5
- package/package.json +7 -7
- package/src/rules/rule-utils.ts +1 -14
package/dist/index.cjs
CHANGED
|
@@ -1199,13 +1199,6 @@ const HTML_VOID_ELEMENTS = new Set([
|
|
|
1199
1199
|
"area", "base", "br", "col", "embed", "hr", "img", "input", "link", "meta",
|
|
1200
1200
|
"param", "source", "track", "wbr",
|
|
1201
1201
|
]);
|
|
1202
|
-
const HTML_BOOLEAN_ATTRIBUTES = new Set([
|
|
1203
|
-
"autofocus", "autoplay", "checked", "controls", "defer", "disabled", "hidden",
|
|
1204
|
-
"loop", "multiple", "muted", "readonly", "required", "reversed", "selected",
|
|
1205
|
-
"open", "default", "formnovalidate", "novalidate", "itemscope", "scoped",
|
|
1206
|
-
"seamless", "allowfullscreen", "async", "compact", "declare", "nohref",
|
|
1207
|
-
"noresize", "noshade", "nowrap", "sortable", "truespeed", "typemustmatch"
|
|
1208
|
-
]);
|
|
1209
1202
|
const HEADING_TAGS = new Set(["h1", "h2", "h3", "h4", "h5", "h6"]);
|
|
1210
1203
|
/**
|
|
1211
1204
|
* SVG elements that use camelCase naming
|
|
@@ -1360,12 +1353,6 @@ function isBlockElement(tagName) {
|
|
|
1360
1353
|
function isVoidElement(tagName) {
|
|
1361
1354
|
return HTML_VOID_ELEMENTS.has(tagName.toLowerCase());
|
|
1362
1355
|
}
|
|
1363
|
-
/**
|
|
1364
|
-
* Checks if an attribute is a boolean attribute
|
|
1365
|
-
*/
|
|
1366
|
-
function isBooleanAttribute(attributeName) {
|
|
1367
|
-
return HTML_BOOLEAN_ATTRIBUTES.has(attributeName.toLowerCase());
|
|
1368
|
-
}
|
|
1369
1356
|
/**
|
|
1370
1357
|
* Attribute visitor that provides granular processing based on both
|
|
1371
1358
|
* attribute name type (static/dynamic) and value type (static/dynamic)
|
|
@@ -5226,7 +5213,7 @@ class BooleanAttributesNoValueVisitor extends AttributeVisitorMixin {
|
|
|
5226
5213
|
this.checkAttribute(originalAttributeName, attributeNode);
|
|
5227
5214
|
}
|
|
5228
5215
|
checkAttribute(attributeName, attributeNode) {
|
|
5229
|
-
if (!isBooleanAttribute(attributeName))
|
|
5216
|
+
if (!core.isBooleanAttribute(attributeName))
|
|
5230
5217
|
return;
|
|
5231
5218
|
if (!core.hasAttributeValue(attributeNode))
|
|
5232
5219
|
return;
|
|
@@ -7599,6 +7586,10 @@ function ruleDocumentationUrl(ruleId) {
|
|
|
7599
7586
|
return `${DOCS_BASE_URL}/${ruleId}`;
|
|
7600
7587
|
}
|
|
7601
7588
|
|
|
7589
|
+
Object.defineProperty(exports, "HTML_BOOLEAN_ATTRIBUTES", {
|
|
7590
|
+
enumerable: true,
|
|
7591
|
+
get: function () { return core.HTML_BOOLEAN_ATTRIBUTES; }
|
|
7592
|
+
});
|
|
7602
7593
|
Object.defineProperty(exports, "findAttributeByName", {
|
|
7603
7594
|
enumerable: true,
|
|
7604
7595
|
get: function () { return core.findAttributeByName; }
|
|
@@ -7671,6 +7662,10 @@ Object.defineProperty(exports, "isAttributeValueQuoted", {
|
|
|
7671
7662
|
enumerable: true,
|
|
7672
7663
|
get: function () { return core.isAttributeValueQuoted; }
|
|
7673
7664
|
});
|
|
7665
|
+
Object.defineProperty(exports, "isBooleanAttribute", {
|
|
7666
|
+
enumerable: true,
|
|
7667
|
+
get: function () { return core.isBooleanAttribute; }
|
|
7668
|
+
});
|
|
7674
7669
|
exports.ABSTRACT_ARIA_ROLES = ABSTRACT_ARIA_ROLES;
|
|
7675
7670
|
exports.ARIA_ATTRIBUTES = ARIA_ATTRIBUTES;
|
|
7676
7671
|
exports.ActionViewNoSilentHelperRule = ActionViewNoSilentHelperRule;
|
|
@@ -7752,7 +7747,6 @@ exports.HTMLNoUnderscoresInAttributeNamesRule = HTMLNoUnderscoresInAttributeName
|
|
|
7752
7747
|
exports.HTMLRequireClosingTagsRule = HTMLRequireClosingTagsRule;
|
|
7753
7748
|
exports.HTMLTagNameLowercaseRule = HTMLTagNameLowercaseRule;
|
|
7754
7749
|
exports.HTML_BLOCK_ELEMENTS = HTML_BLOCK_ELEMENTS;
|
|
7755
|
-
exports.HTML_BOOLEAN_ATTRIBUTES = HTML_BOOLEAN_ATTRIBUTES;
|
|
7756
7750
|
exports.HTML_INLINE_ELEMENTS = HTML_INLINE_ELEMENTS;
|
|
7757
7751
|
exports.HTML_ONLY_TAG_NAMES = HTML_ONLY_TAG_NAMES;
|
|
7758
7752
|
exports.HTML_VOID_ELEMENTS = HTML_VOID_ELEMENTS;
|
|
@@ -7782,7 +7776,6 @@ exports.hasBalancedParentheses = hasBalancedParentheses;
|
|
|
7782
7776
|
exports.isBlockElement = isBlockElement;
|
|
7783
7777
|
exports.isBodyOnlyTag = isBodyOnlyTag;
|
|
7784
7778
|
exports.isBodyTag = isBodyTag;
|
|
7785
|
-
exports.isBooleanAttribute = isBooleanAttribute;
|
|
7786
7779
|
exports.isDocumentOnlyTag = isDocumentOnlyTag;
|
|
7787
7780
|
exports.isHeadAndBodyTag = isHeadAndBodyTag;
|
|
7788
7781
|
exports.isHeadOnlyTag = isHeadOnlyTag;
|