mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
18 lines
461 B
TypeScript
18 lines
461 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
|
|
};
|
|
|
|
const result = HTMLHint.verify('<span></span>', htmlHintRules);
|
|
const formatted = HTMLHint.format(result, { indent: 2 });
|