Skip to main content

List of rules

The following table contains the list of all rules available in Link HTML. To learn more about how activate or configure rules, have a look to this documentation page.

Rule nameDescription
attr-bansSpecify a list of disallowed HTML attributes
attr-name-styleEnforce naming conventions for HTML tag name
attr-name-ignore-regex
attr-new-lineSpecify the numbers of HTML attributes allowed on one line
attr-no-dupDisallow duplications of HTML attributes within the same tag
attr-no-unsafe-charDisallow the use of unsafe unicode char in attributes values
attr-orderSpecify the order of attributes in an HTML tag.
attr-quote-styleEnforce the consistent use of quotes.
attr-req-valueEnforce the presence of a value for an HTML attribute
attr-validateValidate that attributes are correctly written
button-req-contentEnforce the presence of a text content for a button
class-no-dupDisallow the presence of the same className within the class attribute
class-styleEnforce naming convention for CSS classes
doctype-firstEnforce the presence of <!DOCTYPE ...> on top of an HTML document
doctype-html5Enforce the use of the HTML5 doctype
fieldset-contains-legendEvery fieldset element should contain a legend element
fig-req-figcaptionEnforce the presence of the tag <figcaption> inside a <figure> tag.
focusable-tabindex-styleDisallow the use of positive tabindex (>1)
head-req-titleEnforce the presence of a <title> inside <head>
head-valid-content-model
href-stylehref must be set with absolute or relative links.
html-req-langEnforce the presence of the lang attribute on any <html> tag
html-valid-content-model
id-class-ignore-regex
id-class-no-ad
id-class-styleEnforce naming convention for HTML ids and CSS classes
id-no-dupDisallow duplications of HTML ids within the same document
id-styleEnforce naming convention for HTML ids
img-req-altEnforce the presence of a none empty alt attribute on <img>
img-req-srcEnforce the presence of a none empty src attribute on <img>
indent-delta deprecated
indent-styleSpecify indentation style (tab or space)
indent-widthSpecify indentation width
indent-width-cont deprecated
input-btn-req-value-or-titleEnforce the presence of a label for <button>
input-radio-req-nameEnforce the presence of a none empty name attribute on radio input
input-req-labelEnforce the presence of a label for <input>
label-no-enc-textarea-or-selectDisallow the presence of <select> and <textarea> inside a <label>
label-req-forEnforce the presence of a none empty name attribute on <label>
lang-style
line-end-style
line-max-lenLimit the length of a line
line-max-len-ignore-regex
line-no-trailing-whitespaceDisallow trailing whitespace at the end of lines
link-min-length-4Disallow link text with less than 4 chars
link-req-noopenerEnforce the presence of rel="noopener" or rel="noreferrer" attribute on <a>
spec-char-escape
table-req-captionEnforce the presence of <caption> inside <table>
table-req-headerEnforce the presence of <thead> inside <table>
tag-bansDefine a list of HTML tags that are forbidden
tag-close
tag-name-lowercaseEnforce the use of lowercase for tag name
tag-name-match
tag-req-attrDefine a list of attributes that must be present on an HTML tag
tag-self-closeDefine whether or not a self-close tag should end with />
text-ignore-regex
title-max-lenFix a maximum lenght an the <title> content
title-no-dupDisallow the presence of multiple <title>