Rules
Conformance checkingโ
| Rule ID | Fixable | Description |
|---|---|---|
attr-duplication | ๐ง | Warns that attributes were duplicated in one element. Capital letters and lower-case letters are not distinguished. |
correct-aspect-ratio | Warns when the width/height attributes of an img or source element do not match the actual image aspect ratio. | |
deprecated-attr | Warns when there is an attribute defined as deprecated or obsolete. | |
deprecated-element | Warns when there is an element defined as deprecated or obsolete. | |
disallowed-element | Warns if specified elements appear on a document or an element. | |
doctype | Warns when doesn't including DOCTYPE. | |
heading-levels | Warns for skipped heading levels | |
id-duplication | Warns that id attribute value were duplicated in one document. | |
invalid-attr | Warn if an attribute is a non-existent attribute or an invalid type value due to the specifications (or the custom rule). | |
link-types | Validates link type keywords in the rel attribute against the WHATWG standard. | |
no-duplicate-dt | No duplicate names in <dl> | |
no-empty-palpable-content | Warn if there is an empty palpable content element. | |
no-orphaned-end-tag | ๐ง | Warns when an end tag appears without a corresponding start tag, which constitutes an inner parse error in HTML Standard. |
no-unsupported-features | Warns when using HTML elements or attributes not supported by target browsers, or that are experimental/non-standard. | |
permitted-contents | Warn if a child element has a not allowed element or text node. | |
placeholder-label-option | Checking whether the select element needs the placeholder label option. | |
require-datetime | Warn to need the datetime attribute if the time element has invalid content. | |
required-attr | Warns if specified attributes or required attribute on specs are not appeared on an element. | |
required-element | Required elements | |
srcset-sizes-constraint | Enforces WHATWG constraints between srcset, sizes, and loading attributes. |
Accessibilityโ
| Rule ID | Fixable | Description |
|---|---|---|
label-has-control | Warns if the label element has no control. | |
landmark-roles | Whether banner, main, complementary and contentinfo are top-level landmarks. Whether a specific landmark role has unique label when used multiple times on a page | |
neighbor-popovers | Warns when popover triggers and their corresponding targets are not adjacent | |
no-ambiguous-navigable-target-names | Prevents typographical errors in links and more that could inadvertently replace special navigational keywords (_blank, _self, _parent, _top) with invalid target names, ensuring navigations behave as intended. | |
no-consecutive-br | ๐ง | Warns against the use of consecutive <br> tags |
no-refer-to-non-existent-id | Check whether the ID or the list of ID specified to for, form, aria-*, and more, or a fragment in a hyperlink are referencing it that existed in the same document. | |
undefined | undefined | |
require-accessible-name | Warn if the element has no accessible name. | |
require-dialog-autofocus | Requires a dialog shown via the show-modal command to contain an element with the autofocus attribute | |
required-h1 | Warn if there is no h1 element in the document. | |
table-row-column-alignment | Checks for consistency in the defined number of rows and columns. | |
use-list | Prompt to use list element when a bullet character is at the start of a text node. | |
wai-aria | Warn if the role attribute and aria-* attributes don't set in accordance with specs that are WAI-ARIA and ARIA in HTML. |
Naming Conventionโ
| Rule ID | Fixable | Description |
|---|---|---|
class-naming | Warn if the class name does not conform to the specified rules. |
Maintainabilityโ
| Rule ID | Fixable | Description |
|---|---|---|
no-hard-code-id | Warn it hard-coded the value of the id attribute when the element is a fragment. | |
no-use-event-handler-attr | Warn when specifying the event handler attribute. |
Styleโ
| Rule ID | Fixable | Description |
|---|---|---|
attr-order | ๐ง | Enforces a consistent order of attributes on elements. |
attr-value-quotes | ๐ง | Warns if the attribute value is not quoted. |
case-sensitive-attr-name | ๐ง | Warns that the attribute name is not in one of uppercase or lowercase letters. |
case-sensitive-tag-name | ๐ง | Warns that the tag name is not in one of uppercase or lowercase letters. |
character-reference | Warns when unauthorized illegal characters are not escaped with character reference in the text node or attribute value. | |
end-tag | Warn if there is not an end tag. | |
head-element-order | ๐ง | Warns if elements within <head> are not in the expected order. |
ineffective-attr | ๐ง | Warn that if the attribute specified cannot affect (in other words, mean-less) the element. |
no-boolean-attr-value | ๐ง | Warn when it specified any value to the boolean attribute. |
no-default-value | ๐ง | Warn when it specifies the default value to the attribute. |
Removed rulesโ
| Rule ID | Fixable | Description | Drop |
|---|---|---|---|
attr-equal-space-after | Spaces after the equal of attribute | Since v3.0 | |
attr-equal-space-before | Spaces before the equal of attribute | Since v3.0 | |
attr-spacing | Spaces between attributes | Since v3.0 | |
indentation | Indentation | Since v3.0 |