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

最新文章

  1. 设计上如何避免EMC问题
  2. 快速学习C语言一: Hello World
  3. Effective Java 12 Consider implementing Comparable
  4. cocos基础教程(3)cocos3.x版本目录结构介绍
  5. Revit二次开发示例:DisableCommand
  6. hdu 1370 Biorhythms
  7. The Most Wanted Letter
  8. BZOJ 1052 HAOI2007 覆盖问题 二分法答案+DFS
  9. 【JAVAWEB学习笔记】02_HTML&CSS
  10. OSSEC初探
  11. 作为一个零基础的新手,如何系统的自学Java和JavaEE开发技术?
  12. TableExistsException: hbase:namespace
  13. liunx驱动----按键中断
  14. 【翻译】WPF4.5新特性(MSDN的翻译读不太懂)
  15. Azure 认知服务 (1) 概述
  16. AVFoundation-视频录制以及拍照
  17. php之复制文件——php经典实例
  18. 如何查看ESXi的网卡的MAC地址?
  19. Program Size: data=9.0 xdata=0 code=47
  20. thinkpadT480安装archlinux

热门文章

  1. 2019-2020Nowcoder Girl初赛题解
  2. Codeforces 1190B. Tokitsukaze, CSL and Stone Game
  3. Erasing Substrings CodeForces - 938F (字符串dp)
  4. Vue实例:vue2.0+ElementUI框架开发pc项目
  5. 关于fastJson的几个问题
  6. symfony3 使用命令行工具生成Entity实体所踩的坑
  7. 2019.9.27PHP基础
  8. JMeter元件之Test Fragment
  9. autocomplete用法
  10. Reservoir Computing: Harnessing a Universal Dynamical System