用于测试 fis-lint-html-hint 的模块。
// 首先安装 fis3
npm install fis3 -g
1. 测试使用 HTMLHint 默认规则 进行检测:
cd default
npm install // 本地安装 fis-lint-html-hint
npm test // 该命令将使用 fis3 命令
// 如果你安装了 fiss,可以使用下面命令进行测试
npm run test-on-fiss
对应 fis-conf.js :
fis.match('*.html', {
lint: fis.plugin('html-hint') // 直接使用默认配置
});
cd custom
npm install
npm test
// 如果你安装了 fiss,可以使用下面命令进行测试
npm run test-on-fiss
对应的 fis-conf.js:
fis.match('*.html', {
lint: fis.plugin('html-hint', {
ignoreFiles: ['test-4-ignore.html'], // 忽略掉 test-4-ignore.html,html-hint 不对其进行校验
rules: {
'tag-pair': true // 标签需要闭合
}
})
});