0.1.0 • Published 9 years ago

xg-htmlhint v0.1.0

Weekly downloads
6
License
MIT
Repository
github
Last release
9 years ago

xg-htmlhint

xg-htmlhint 是一个静态的HTML代码检查工具,可以在命令行和页面脚本中使用。Fork自https://github.com/yaniswang/HTMLHint,在其基础上做了部分改进和扩展。

Quick Start

  1. install & options

    npm install htmlhint -g
    xhtmlhint -V
    xhtmlhint -l
    xhtmlhint -c rule.conf
  2. hint

    xhtmlhint test.html
    xhtmlhint test/
    xhtmlhint 
  3. result

    test.html:
    	line 1, col 1: Doctype must be uppercase.
    	line 11, col 21: The value of attribute [ class ] must be in double quotes.
    	line 14, col 2: Special characters must be escaped : [ < ].
    	line 14, col 49: Special characters must be escaped : [ > ].
    	line 14, col 78: Tag must be paired, no start tag: [ <button> ]
    
    4 Errors,1 Warnings
  4. config rules
    根目录下获取.htmlhintrc文件中的内容作为自定义配置规则,如果没有就使用默认规则。也可以指定配置文件,使用命令htmlhint -c rule.conf
    行内嵌套规则

    <!--htmlhint tag-pair:false,id-class-value:underline -->
    <html>
    <head>

Guide

  1. 如何使用
  2. 规则列表
  3. 如何添加自定义规则

0.1.0

9 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago