]> source.dussan.org Git - jquery.git/commitdiff
Update devDependencies, adjust .jshintrc to jsHint 2.x, use .jshintignore. Close...
authorMichał Gołębiowski <m.goleb@gmail.com>
Thu, 11 Jul 2013 16:52:07 +0000 (12:52 -0400)
committerTimmy Willison <timmywillisn@gmail.com>
Thu, 11 Jul 2013 16:59:44 +0000 (12:59 -0400)
Conflicts:
src/.jshintrc
test/.jshintrc

.jshintignore [new file with mode: 0644]
Gruntfile.js
package.json
src/.jshintrc
test/.jshintignore [deleted file]
test/.jshintrc

diff --git a/.jshintignore b/.jshintignore
new file mode 100644 (file)
index 0000000..6c1c770
--- /dev/null
@@ -0,0 +1,7 @@
+test/qunit/**
+test/data/jquery-1.9.1.ajax_xhr.min.js
+test/data/badcall.js
+test/data/badjson.js
+test/data/json_obj.js
+test/data/readywaitasset.js
+test/data/readywaitloader.js
index fc9fbb4624cf79fac4dc4bad396c3c413329046f..ef5e184219d8abb3408d5e7c1fd848ad30e26639 100644 (file)
@@ -15,7 +15,8 @@ module.exports = function( grunt ) {
                        } catch(e) {}
                        return data;
                },
-               srcHintOptions = readOptionalJSON("src/.jshintrc");
+               fs = require( "fs" ),
+               srcHintOptions = readOptionalJSON( "src/.jshintrc" );
 
        // The concatenated file won't pass onevar
        // But our modules can
@@ -85,9 +86,7 @@ module.exports = function( grunt ) {
                                }
                        },
                        tests: {
-                               // TODO: Once .jshintignore is supported, use that instead.
-                               // issue located here: https://github.com/gruntjs/grunt-contrib-jshint/issues/1
-                               src: [ "test/data/{test,testinit,testrunner}.js", "test/unit/**/*.js" ],
+                               src: [ "test/**/*.js" ],
                                options: {
                                        jshintrc: "test/.jshintrc"
                                }
@@ -448,7 +447,7 @@ module.exports = function( grunt ) {
 
        // Process files for distribution
        grunt.registerTask( "dist", function() {
-               var stored, flags, paths, fs, nonascii;
+               var stored, flags, paths, nonascii;
 
                // Check for stored destination paths
                // ( set in dist/.destination.json )
@@ -463,7 +462,6 @@ module.exports = function( grunt ) {
                });
 
                // Ensure the dist files are pure ASCII
-               fs = require( "fs" );
                nonascii = false;
 
                distpaths.forEach(function( filename ) {
@@ -554,8 +552,6 @@ module.exports = function( grunt ) {
        // The problem is caused by the pre-uglify task.
        // Also, remove temporary files.
        grunt.registerMultiTask( "post-uglify", function() {
-               var fs = require( "fs" );
-
                this.files.forEach(function( mapping ) {
                        var mapFileName = mapping.src[ 0 ];
 
index 84003205cd90373081b3db89bdb2ecca3074e89b..01fe0df254330eab3f513ff77354eeeee934a36b 100644 (file)
        ],
        "dependencies": {},
        "devDependencies": {
-               "grunt": "0.4.1",
+               "grunt": "~0.4.1",
                "grunt-compare-size": "~0.4.0",
-               "grunt-git-authors": "1.2.0",
+               "grunt-git-authors": "~1.2.0",
                "grunt-contrib-watch": "~0.4.4",
                "grunt-contrib-jshint": "~0.6.0",
                "grunt-contrib-uglify": "~0.2.2",
-               "gzip-js": "0.3.1",
+               "gzip-js": "0.3.2",
                "testswarm": "~1.1.0",
-               "archiver": "~0.4.2"
+               "archiver": "~0.4.6"
        },
        "keywords": []
 }
index a157a55f2553237ac1d8a4bd17275c9ab02ce795..10541d501cce1cd745d281c03f59ac222c06c474 100644 (file)
        "evil": true,
        "sub": true,
 
+       "es3": true,
        "browser": true,
        "wsh": true,
 
        "globals": {
+               "jQuery": true,
                "define": true,
-               "module": true,
-               "jQuery": true
+               "module": true
        }
 }
diff --git a/test/.jshintignore b/test/.jshintignore
deleted file mode 100644 (file)
index 8f2ed18..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-qunit/
-data/badjson.js
-data/jquery-1.9.1.ajax_xhr.min.js
index db5851c4ecc904493a38a58c417961aaff8fb192..75c50eeeb717e05b00a7ba65dcb3b18898495cef 100644 (file)
        "devel": true,
        "wsh": true,
 
-       "predef": [
-               "DOMParser",
-               "jQuery",
-               "QUnit",
-               "module",
-               "ok",
-               "equal",
-               "test",
-               "asyncTest",
-               "notEqual",
-               "deepEqual",
-               "strictEqual",
-               "notStrictEqual",
-               "start",
-               "stop",
-               "expect",
-               "raises",
-               "ajaxTest",
-               "testIframe",
-               "testIframeWithCallback",
-               "createDashboardXML",
-               "createXMLFragment",
-               "moduleTeardown",
-               "testFoo",
-               "url",
-               "t",
-               "q",
-               "amdDefined",
-               "fireNative",
-               "Globals",
-               "hasPHP",
-               "isLocal",
-               "originaljQuery",
-               "$",
-               "original$",
-               "externalHost"
-       ]
+       "globals": {
+               "DOMParser": false,
+               "QUnit": false,
+               "ok": false,
+               "equal": false,
+               "asyncTest": false,
+               "notEqual": false,
+               "deepEqual": false,
+               "strictEqual": false,
+               "notStrictEqual": false,
+               "start": false,
+               "stop": false,
+               "expect": false,
+               "raises": false,
+               "ajaxTest": false,
+               "testIframe": false,
+               "testIframeWithCallback": false,
+               "createDashboardXML": false,
+               "createXMLFragment": false,
+               "moduleTeardown": false,
+               "testFoo": false,
+               "url": false,
+               "t": false,
+               "q": false,
+
+               "jQuery": true,
+               "module": true,
+               "test": true,
+               "amdDefined": true,
+               "fireNative": true,
+               "Globals": true,
+               "hasPHP": true,
+               "isLocal": true,
+               "originaljQuery": true,
+               "$": true,
+               "original$": true,
+               "externalHost": true
+       }
 }