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 name | Description |
---|---|
attr-bans | Specify a list of disallowed HTML attributes |
attr-name-style | Enforce naming conventions for HTML tag name |
attr-name-ignore-regex | |
attr-new-line | Specify the numbers of HTML attributes allowed on one line |
attr-no-dup | Disallow duplications of HTML attributes within the same tag |
attr-no-unsafe-char | Disallow the use of unsafe unicode char in attributes values |
attr-order | Specify the order of attributes in an HTML tag. |
attr-quote-style | Enforce the consistent use of quotes. |
attr-req-value | Enforce the presence of a value for an HTML attribute |
attr-validate | Validate that attributes are correctly written |
button-req-content | Enforce the presence of a text content for a button |
class-no-dup | Disallow the presence of the same className within the class attribute |
class-style | Enforce naming convention for CSS classes |
doctype-first | Enforce the presence of <!DOCTYPE ...> on top of an HTML document |
doctype-html5 | Enforce the use of the HTML5 doctype |
fieldset-contains-legend | Every fieldset element should contain a legend element |
fig-req-figcaption | Enforce the presence of the tag <figcaption> inside a <figure> tag. |
focusable-tabindex-style | Disallow the use of positive tabindex (>1) |
head-req-title | Enforce the presence of a <title> inside <head> |
head-valid-content-model | |
href-style | href must be set with absolute or relative links. |
html-req-lang | Enforce the presence of the lang attribute on any <html> tag |
html-valid-content-model | |
id-class-ignore-regex | |
id-class-no-ad | |
id-class-style | Enforce naming convention for HTML ids and CSS classes |
id-no-dup | Disallow duplications of HTML ids within the same document |
id-style | Enforce naming convention for HTML ids |
img-req-alt | Enforce the presence of a none empty alt attribute on <img> |
img-req-src | Enforce the presence of a none empty src attribute on <img> |
indent-delta deprecated | |
indent-style | Specify indentation style (tab or space ) |
indent-width | Specify indentation width |
indent-width-cont deprecated | |
input-btn-req-value-or-title | Enforce the presence of a label for <button> |
input-radio-req-name | Enforce the presence of a none empty name attribute on radio input |
input-req-label | Enforce the presence of a label for <input> |
label-no-enc-textarea-or-select | Disallow the presence of <select> and <textarea> inside a <label> |
label-req-for | Enforce the presence of a none empty name attribute on <label> |
lang-style | |
line-end-style | |
line-max-len | Limit the length of a line |
line-max-len-ignore-regex | |
line-no-trailing-whitespace | Disallow trailing whitespace at the end of lines |
link-min-length-4 | Disallow link text with less than 4 chars |
link-req-noopener | Enforce the presence of rel="noopener" or rel="noreferrer" attribute on <a> |
spec-char-escape | |
table-req-caption | Enforce the presence of <caption> inside <table> |
table-req-header | Enforce the presence of <thead> inside <table> |
tag-bans | Define a list of HTML tags that are forbidden |
tag-close | |
tag-name-lowercase | Enforce the use of lowercase for tag name |
tag-name-match | |
tag-req-attr | Define a list of attributes that must be present on an HTML tag |
tag-self-close | Define whether or not a self-close tag should end with /> |
text-ignore-regex | |
title-max-len | Fix a maximum lenght an the <title> content |
title-no-dup | Disallow the presence of multiple <title> |