Rules

  1. 🔧: Meaning the rule can fix problems automatically by running eslint --fix options.
  2. ⭐: Meaning the rule is recommended.

Best Practice

RuleDescription
no-duplicate-attrsDisallow to use duplicate attributes
no-duplicate-idDisallow to use duplicate id
no-inline-stylesDisallow using inline style
no-obsolete-tagsDisallow to use obsolete elements in HTML5
no-restricted-attr-valuesDisallow specified attributes
no-restricted-attrsDisallow specified attributes
no-script-style-typeEnforce to omit type attributes for style sheets and scripts🔧
no-target-blankDisallow usage of unsafe target='_blank'
require-attrsRequire specified attributes
require-button-typeRequire use of button element with a valid type attribute.
require-closing-tagsRequire closing tags.⭐🔧
require-doctypeRequire <!DOCTYPE HTML> in html,⭐🔧
require-li-containerEnforce <li> to be in <ul>, <ol> or <menu>.
require-meta-charsetEnforce to use <meta charset="..."> in <head>

SEO

RuleDescription
no-multiple-h1Disallow multiple <h1></h1>.
require-langRequire lang attribute at <html> tag
require-meta-descriptionRequire use of <meta name="description"> in <head>
require-open-graph-protocolEnforce to use <meta name="viewport"> in <head>
require-titleRequire <title><title/> in the <head><head/>

Accessibility

RuleDescription
no-abstract-rolesDisallow to use of abstract roles
no-accesskey-attrsDisallow to use of accesskey attribute
no-aria-hidden-bodyDisallow to use aria-hidden attributes on the body element.
no-non-scalable-viewportDisallow use of user-scalable=no in <meta name="viewport">.
no-positive-tabindexDisallow use of positive tabindex.
no-skip-heading-levelsDisallow skipping heading levels
require-frame-titleRequire title in <frame>, <iframe>
require-img-altRequire alt attribute at <img> tag
require-meta-viewportEnforce to use <meta name="viewport"> in <head>

Style

RuleDescription
element-newlineEnforce newline between elements.⭐🔧
id-naming-conventionEnforce consistent naming id attributes
indentEnforce consistent indentation⭐🔧
lowercaseEnforce to use lowercase for tag and attribute names.🔧
no-extra-spacing-attrsDisallow an extra spacing around attributes⭐🔧
no-multiple-empty-linesDisallow multiple empty lines🔧
no-trailing-spacesDisallow trailing whitespace at the end of lines🔧
quotesEnforce consistent quoting attributes with double(") or single(')⭐🔧
sort-attrsEnforce attributes alphabetical sorting🔧