aboutsummaryrefslogtreecommitdiffstats
path: root/Gruntfile.js
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2015-03-18 13:42:52 +0100
committerJörn Zaefferer <joern.zaefferer@gmail.com>2015-03-18 14:18:34 +0100
commit4e6e27d0731873a8aa40e89a1a2b7d56faf3dab3 (patch)
treef3211fb760bbf9822f38325691b0b1897394654e /Gruntfile.js
parent62620a3fdbe99c6ef847529d5ceffb95decf7875 (diff)
downloadjquery-ui-4e6e27d0731873a8aa40e89a1a2b7d56faf3dab3.tar.gz
jquery-ui-4e6e27d0731873a8aa40e89a1a2b7d56faf3dab3.zip
Build: Increase htmllint coverage by testing all files, ignoring errors
Also formats jscsBad array and sorts it alphabetically. Closes gh-1507
Diffstat (limited to 'Gruntfile.js')
-rw-r--r--Gruntfile.js40
1 files changed, 35 insertions, 5 deletions
diff --git a/Gruntfile.js b/Gruntfile.js
index 62b283960..80ad9b967 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -78,7 +78,27 @@ var
},
component = grunt.option( "component" ) || "**",
- jscsBad = [ "ui/tabs.js", "ui/slider.js", "ui/selectable.js", "ui/resizable.js", "ui/mouse.js", "ui/menu.js", "ui/effect*.js", "ui/droppable.js", "ui/draggable.js", "ui/button.js", "ui/datepicker.js", "ui/sortable.js" ];
+ jscsBad = [
+ "ui/button.js",
+ "ui/datepicker.js",
+ "ui/draggable.js",
+ "ui/droppable.js",
+ "ui/effect*.js",
+ "ui/menu.js",
+ "ui/mouse.js",
+ "ui/resizable.js",
+ "ui/selectable.js",
+ "ui/slider.js",
+ "ui/sortable.js",
+ "ui/tabs.js"
+ ],
+
+ htmllintBad = [
+ "demos/tabs/ajax/content*.html",
+ "demos/tooltip/ajax/content*.html",
+ "tests/unit/core/core.html",
+ "tests/unit/tabs/data/test.html"
+ ];
function mapMinFile( file ) {
return "dist/" + file.replace( /ui\//, "minified/" );
@@ -187,10 +207,20 @@ grunt.initConfig({
},
uglify: minify,
htmllint: {
- // ignore files that contain invalid html, used only for ajax content testing
- all: grunt.file.expand( [ "demos/**/*.html", "tests/**/*.html" ] ).filter(function( file ) {
- return !/(?:ajax\/content\d\.html|tabs\/data\/test\.html|tests\/unit\/core\/core.*\.html)/.test( file );
- })
+ good: [ "demos/**/*.html", "tests/**/*.html" ].concat( htmllintBad.map( function( file ) {
+ return "!" + file;
+ } ) ),
+ bad: {
+ options: {
+ ignore: [
+ /Start tag seen without seeing a doctype first/,
+ /Element “head” is missing a required instance of child element “title”/,
+ /Element “object” is missing one or more of the following/,
+ /The “codebase” attribute on the “object” element is obsolete/
+ ]
+ },
+ src: htmllintBad
+ }
},
qunit: {
files: expandFiles( "tests/unit/" + component + "/*.html" ).filter(function( file ) {