DefinitelyTyped/types/htmlhint/htmlhint-tests.ts
2017-03-24 14:27:52 -07:00

19 lines
530 B
TypeScript

import { HTMLHint, RuleSet } from "htmlhint";
const htmlHintRules: RuleSet = {
"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,
"space-tab-mixed-disabled": "tab"
};
const result = HTMLHint.verify('<span></span>', htmlHintRules);
const formatted = HTMLHint.format(result, { indent: 2 });