码迷,mamicode.com
首页 > Web开发 > 详细

HTMLHint 配置文件

时间:2019-12-12 23:44:17      阅读:120      评论:0      收藏:0      [点我收藏+]

标签:data-   com   lse   静态   line   elf   segment   建议   doc   

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 规则详解

HTMLHint 配置文件

标签:data-   com   lse   静态   line   elf   segment   建议   doc   

原文地址:https://www.cnblogs.com/homehtml/p/12032187.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!