All Rules
- 🔧 - Meaning the rule can fix problems aotomatically by running eslint
--fix
options. - ⭐ - Meaning the rule is recommended.
Best Pracice
rule | description | |
---|---|---|
@html-eslint/require-doctype | Require <!DOCTYPE HTML> in html, | ⭐🔧 |
@html-eslint/no-duplicate-id | Disallow to use duplicate id | ⭐ |
@html-eslint/no-inline-styles | Disallow using inline style | |
@html-eslint/require-li-container | Enforce <li> to be in <ul> , <ol> or <menu> . | ⭐ |
@html-eslint/no-obsolete-tags | Disallow to use obsolete elements in HTML5 | ⭐ |
@html-eslint/require-closing-tags | Require closing tags. | ⭐🔧 |
@html-eslint/require-meta-charset | Enforce to use <meta name="chartset"> in <head> | |
@html-eslint/no-target-blank | Disallow usage of unsafe target='_blank' | |
@html-eslint/no-duplicate-attrs | Disallow to use duplicate attributes | ⭐ |
@html-eslint/require-button-type | Require use of button element with a valid type attribute. | |
@html-eslint/no-restricted-attrs | Disallow specified attributes |
SEO
rule | description | |
---|---|---|
@html-eslint/require-lang | Require lang attribute at <html> tag | ⭐ |
@html-eslint/require-title | Require <title><title/> in the <head><head/> | ⭐ |
@html-eslint/no-multiple-h1 | Disallow multiple <h1></h1> . | ⭐ |
@html-eslint/require-meta-description | Require use of <meta name="description"> in <head> |
Accessibility
rule | description | |
---|---|---|
@html-eslint/require-img-alt | Require alt attribute at <img> tag | ⭐ |
@html-eslint/no-skip-heading-levels | Disallow skipping heading levels | |
@html-eslint/require-frame-title | Require title in <frame> , <iframe> | |
@html-eslint/no-non-scalable-viewport | Disallow use of user-scalable=no in <meta name="viewport"> . | |
@html-eslint/no-positive-tabindex | Disallow use of positive tabindex . | |
@html-eslint/require-meta-viewport | Enforce to use <meta name="viewport"> in <head> | |
@html-eslint/no-abstract-roles | Disallow to use of abstract roles | |
@html-eslint/no-aria-hidden-body | Disallow to use aria-hidden attributes on the body element. | |
@html-eslint/no-accesskey-attrs | Disallow to use of accesskey attribute |
Styles
rule | description | |
---|---|---|
@html-eslint/no-extra-spacing-attrs | Disallow an extra spacing around attributes | ⭐🔧 |
@html-eslint/element-newline | Enforce newline between elements. | ⭐🔧 |
@html-eslint/indent | Enforce consistent indentation | ⭐🔧 |
@html-eslint/quotes | Enforce consistent quoting attributes with double(") or single(') | ⭐🔧 |
@html-eslint/id-naming-convention | Enforce consistent naming id attributes | |
@html-eslint/no-multiple-empty-lines | Disallow multiple empty lines | 🔧 |