Build: Upgrade to the latest Grunt and JSHint - Closes gh-786

This commit is contained in:
Mike Sherov 2012-10-22 17:41:54 -04:00 committed by Corey Frang
parent 9b908878ae
commit d67522e329
12 changed files with 68 additions and 75 deletions

View File

@ -3,10 +3,9 @@
"eqnull": true, "eqnull": true,
"eqeqeq": true, "eqeqeq": true,
"expr": true, "expr": true,
"latedef": true,
"noarg": true, "noarg": true,
"node": true,
"onevar": true, "onevar": true,
"smarttabs": true,
"trailing": true, "trailing": true,
"undef": true "undef": true
} }

View File

@ -1,13 +0,0 @@
{
"curly": true,
"eqnull": true,
"eqeqeq": true,
"expr": true,
"noarg": true,
"node": true,
"onevar": true,
"smarttabs": true,
"strict": false,
"trailing": true,
"undef": true
}

View File

@ -1,6 +1,8 @@
#!/usr/bin/env node #!/usr/bin/env node
/*global cat:true cd:true cp:true echo:true exec:true exit:true ls:true*/ /*global cat:true cd:true cp:true echo:true exec:true exit:true ls:true*/
"use strict";
var baseDir, repoDir, prevVersion, newVersion, nextVersion, tagTime, var baseDir, repoDir, prevVersion, newVersion, nextVersion, tagTime,
fs = require( "fs" ), fs = require( "fs" ),
path = require( "path" ), path = require( "path" ),

View File

@ -1,6 +1,9 @@
module.exports = function( grunt ) { module.exports = function( grunt ) {
var path = require( "path" ); "use strict";
var path = require( "path" ),
fs = require( "fs" );
grunt.registerTask( "manifest", "Generate jquery.json manifest files", function() { grunt.registerTask( "manifest", "Generate jquery.json manifest files", function() {
var pkg = grunt.config( "pkg" ), var pkg = grunt.config( "pkg" ),

View File

@ -1,6 +1,7 @@
/*jshint node: true */
module.exports = function( grunt ) { module.exports = function( grunt ) {
"use strict";
var versions = { var versions = {
"git": "git", "git": "git",
"1.8": "1.8.0 1.8.1 1.8.2", "1.8": "1.8.0 1.8.1 1.8.2",

View File

@ -1,6 +1,7 @@
/*jshint node: true */
module.exports = function( grunt ) { module.exports = function( grunt ) {
"use strict";
var var
// files // files
coreFiles = [ coreFiles = [
@ -326,9 +327,7 @@ grunt.initConfig({
} }
return { return {
// TODO: use "faux strict mode" https://github.com/jshint/jshint/issues/504 grunt: parserc(),
// TODO: limit `smarttabs` to multi-line comments https://github.com/jshint/jshint/issues/503
options: parserc(),
ui: parserc( "ui/" ), ui: parserc( "ui/" ),
// TODO: `evil: true` is only for document.write() https://github.com/jshint/jshint/issues/519 // TODO: `evil: true` is only for document.write() https://github.com/jshint/jshint/issues/519
// TODO: don't create so many globals in tests // TODO: don't create so many globals in tests

View File

@ -48,7 +48,7 @@
], ],
"dependencies": {}, "dependencies": {},
"devDependencies": { "devDependencies": {
"grunt": "~0.3.9", "grunt": "~0.3.17",
"grunt-css": "0.2.0", "grunt-css": "0.2.0",
"grunt-compare-size": "0.1.4", "grunt-compare-size": "0.1.4",
"grunt-html": "0.1.1", "grunt-html": "0.1.1",

View File

@ -9,7 +9,6 @@
"latedef": true, "latedef": true,
"noarg": true, "noarg": true,
"onevar": true, "onevar": true,
"smarttabs": true,
"trailing": true, "trailing": true,
"undef": true, "undef": true,
"predef": [ "predef": [

View File

@ -12,6 +12,10 @@ function includeScript( url ) {
document.write( "<script src='../../../" + url + "'></script>" ); document.write( "<script src='../../../" + url + "'></script>" );
} }
function url( value ) {
return value + (/\?/.test(value) ? "&" : "?") + new Date().getTime() + "" + parseInt(Math.random() * 100000, 10);
}
reset = QUnit.reset; reset = QUnit.reset;
QUnit.reset = function() { QUnit.reset = function() {
// Ensure jQuery events and data on the fixture are properly removed // Ensure jQuery events and data on the fixture are properly removed
@ -65,11 +69,11 @@ TestHelpers.testJshint = function( module ) {
$.when( $.when(
$.ajax({ $.ajax({
url: "../../../ui/.jshintrc", url: url("../../../ui/.jshintrc"),
dataType: "json" dataType: "json"
}), }),
$.ajax({ $.ajax({
url: "../../../ui/jquery.ui." + module + ".js", url: url("../../../ui/jquery.ui." + module + ".js"),
dataType: "text" dataType: "text"
}) })
).done(function( hintArgs, srcArgs ) { ).done(function( hintArgs, srcArgs ) {

View File

@ -8,7 +8,6 @@
"latedef": true, "latedef": true,
"noarg": true, "noarg": true,
"onevar": true, "onevar": true,
"smarttabs": true,
"trailing": true, "trailing": true,
"undef": true, "undef": true,
"predef": [ "predef": [