当前位置: 首页 > Web前端 > HTML5

HTMLHint配置文件

时间:2023-04-05 16:14:38 HTML5

HTMLHint工具可以对HTML代码进行静态代码检查,从而保证HTML代码的规范性和质量。HTMLHint工具有23条内置规则。建议在.htmlhintrc配置文件中尽量开启所有规则:{"tagname-lowercase":true,"attr-lowercase":true,"attr-value-double-quotes":true,"attr-value-not-empty":true,"attr-no-duplication":true,"doctype-first":true,"tag-pair":true,"tag-self-close":true,"spec-char-escape":true,"id-unique":true,"src-not-empty":true,"title-require":true,"alt-require":true,"doctype-html5":true,"id-class-value":"dash","style-disabled":true,"inline-style-disabled":true,"inline-script-disabled":true,"space-tab-mixed-disabled":"space4","id-class-ad-disabled":true,"href-abs-or-rel":false,"attr-unsafe-chars":true,"head-script-disabled":true}各为具体规则的含义请看下一篇htmlhint规则