mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Build: Increase htmllint coverage by testing all files, ignoring errors
Also formats jscsBad array and sorts it alphabetically. Closes gh-1507
This commit is contained in:
parent
62620a3fdb
commit
4e6e27d073
40
Gruntfile.js
40
Gruntfile.js
@ -78,7 +78,27 @@ var
|
|||||||
},
|
},
|
||||||
component = grunt.option( "component" ) || "**",
|
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 ) {
|
function mapMinFile( file ) {
|
||||||
return "dist/" + file.replace( /ui\//, "minified/" );
|
return "dist/" + file.replace( /ui\//, "minified/" );
|
||||||
@ -187,10 +207,20 @@ grunt.initConfig({
|
|||||||
},
|
},
|
||||||
uglify: minify,
|
uglify: minify,
|
||||||
htmllint: {
|
htmllint: {
|
||||||
// ignore files that contain invalid html, used only for ajax content testing
|
good: [ "demos/**/*.html", "tests/**/*.html" ].concat( htmllintBad.map( function( file ) {
|
||||||
all: grunt.file.expand( [ "demos/**/*.html", "tests/**/*.html" ] ).filter(function( file ) {
|
return "!" + file;
|
||||||
return !/(?:ajax\/content\d\.html|tabs\/data\/test\.html|tests\/unit\/core\/core.*\.html)/.test( 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: {
|
qunit: {
|
||||||
files: expandFiles( "tests/unit/" + component + "/*.html" ).filter(function( file ) {
|
files: expandFiles( "tests/unit/" + component + "/*.html" ).filter(function( file ) {
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
"grunt-contrib-uglify": "0.1.1",
|
"grunt-contrib-uglify": "0.1.1",
|
||||||
"grunt-esformatter": "0.2.0",
|
"grunt-esformatter": "0.2.0",
|
||||||
"grunt-git-authors": "2.0.0",
|
"grunt-git-authors": "2.0.0",
|
||||||
"grunt-html": "1.0.0",
|
"grunt-html": "4.0.1",
|
||||||
"grunt-jscs": "1.5.0",
|
"grunt-jscs": "1.5.0",
|
||||||
"load-grunt-tasks": "0.3.0",
|
"load-grunt-tasks": "0.3.0",
|
||||||
"rimraf": "2.1.4",
|
"rimraf": "2.1.4",
|
||||||
|
Loading…
Reference in New Issue
Block a user