fis3-lint-htmlhint

a html linter plugin of fis3 based on htmlhint.

Usage no npm install needed!

<script type="module">
  import fis3LintHtmlhint from 'https://cdn.skypack.dev/fis3-lint-htmlhint';
</script>

README

fis3-lint-htmlhint

a html linter plugin of fis3 based on htmlhint.

styled with prettier npm npm npm

install

npm install --global fis3-lint-htmlhint

usage

// fis-conf.js

// config with .htmlhintrc file (Recommended)
const htmlhintConf = {
  // key `rules` should be falsy
};

fis.match('*.html', {
  lint: fis.plugin('htmlhint', htmlhintConf);
});


// config with inline rules
const htmlhintConf = {
  rules: {
    "tagname-lowercase": true,
    "attr-lowercase": true,
    "attr-value-double-quotes": true,
    "doctype-first": true,
    "tag-pair": true,
    "spec-char-escape": true,
    "id-unique": true,
    "src-not-empty": true,
    "attr-no-duplication": true,
    "title-require": true
  }
};

rules: https://github.com/yaniswang/HTMLHint/wiki/Rules

links

license

MIT © fisker Cheung