Skip to content

Instantly share code, notes, and snippets.

@Grawl
Last active November 15, 2017 06:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Grawl/9f69ae96c42b617e29d4c3af933869f5 to your computer and use it in GitHub Desktop.
Save Grawl/9f69ae96c42b617e29d4c3af933869f5 to your computer and use it in GitHub Desktop.
FEIP HTML lint rules
{
"alt-require": true,
"attr-lowercase": true,
"attr-no-duplication": true,
"attr-unsafe-chars": true,
"attr-value-double-quotes": false,
"attr-value-not-empty": false,
"csslint": false,
"doctype-first": true,
"doctype-html5": true,
"head-script-disabled": false,
"href-abs-or-rel": false,
"id-class-ad-disabled": true,
"id-class-value": false,
"id-unique": true,
"inline-script-disabled": false,
"inline-style-disabled": false,
"jshint": false,
"space-tab-mixed-disabled": true,
"spec-char-escape": true,
"src-not-empty": true,
"style-disabled": false,
"tag-pair": true,
"tag-self-close": false,
"tagname-lowercase": true,
"title-require": true
}

ALT is required for IMG and empty ALT is not allowed

good:

<img src='tree.png' alt='tree'>

bad:

<img src='tree.png' alt=''>
<img src='tree.png'>

Empty attributes is not allowed, use attribute without a value instead

good:

<div data-attr></div>

bad:

<div data-attr=''></div>

Use single quotes, double quotes only when necessary

good:

<div class='block' v-bind:class="{ 'is-active': isActive }">

Do not close self-closing tags

good:

<input type='checkbox'>

bad:

<input type='checkbox' />
<input type='checkbox'></input>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment