From 73b50769d894182d1fa9c540fb1cc30cc666e170 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Tue, 20 Jan 2015 01:18:06 +0200 Subject: [PATCH] Switch to grunt-html over grunt-html-validation. --- Gruntfile.js | 21 ++++++++------------- package.json | 2 +- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index daa63a5923..761e7089b9 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -325,21 +325,16 @@ module.exports = function (grunt) { } }, - validation: { + htmllint: { options: { - charset: 'utf-8', - doctype: 'HTML5', - failHard: true, - reset: true, - relaxerror: [ - 'Element img is missing required attribute src.', - 'Attribute autocomplete not allowed on element input at this point.', - 'Attribute autocomplete not allowed on element button at this point.' + ignore: [ + 'Attribute "autocomplete" not allowed on element "button" at this point.', + 'Attribute "autocomplete" not allowed on element "input" at this point.', + 'Bad value "X-UA-Compatible" for attribute "http-equiv" on element "meta".', + 'Element "img" is missing required attribute "src".' ] }, - files: { - src: '_gh_pages/**/*.html' - } + src: '_gh_pages/**/*.html' }, watch: { @@ -414,7 +409,7 @@ module.exports = function (grunt) { require('time-grunt')(grunt); // Docs HTML validation task - grunt.registerTask('validate-html', ['jekyll:docs', 'validation']); + grunt.registerTask('validate-html', ['jekyll:docs', 'htmllint']); var runSubset = function (subset) { return !process.env.TWBS_TEST || process.env.TWBS_TEST === subset; diff --git a/package.json b/package.json index 2c0366df01..a60e99ab4c 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "grunt-contrib-watch": "~0.6.1", "grunt-csscomb": "~3.0.0", "grunt-exec": "~0.4.6", - "grunt-html-validation": "~0.1.18", + "grunt-html": "~2.0.0", "grunt-jekyll": "~0.4.2", "grunt-jscs": "~1.2.0", "grunt-saucelabs": "~8.5.0",