]> source.dussan.org Git - jquery.git/commitdiff
Update grunt-contrib-jshint to 0.3.0, ref gh-1204.
authorMichał Gołębiowski <m.goleb@gmail.com>
Wed, 13 Mar 2013 23:23:36 +0000 (00:23 +0100)
committerDave Methvin <dave.methvin@gmail.com>
Thu, 4 Apr 2013 00:41:41 +0000 (20:41 -0400)
13 files changed:
build/release.js
package.json
speed/benchmark.js
src/.jshintrc
src/ajax.js
src/attributes.js
src/core.js
src/data.js
src/effects.js
src/event.js
test/data/testrunner.js
test/unit/ajax.js
test/unit/attributes.js

index e8313c038715e764185cc04b2c9162f3fb35a2c2..bcf97d8fedc16d9d7f2c6896c49cb9c1c1cdb108 100644 (file)
@@ -180,7 +180,7 @@ function uploadToCDN( next ) {
                });
        });
        cmds.push( next );
-       
+
        steps.apply( this, cmds );
 }
 
index 6607ed9b60ef5e5269b90743383cab5d19005f53..b44de1e15e9e613ff3829240fc91434ce5aa2d54 100644 (file)
@@ -27,7 +27,7 @@
                "grunt-git-authors": "1.2.0",
                "grunt-update-submodules": "0.2.0",
                "grunt-contrib-watch": "0.3.1",
-               "grunt-contrib-jshint": "0.1.1rc6",
+               "grunt-contrib-jshint": "0.3.0",
                "grunt-contrib-uglify": "0.1.2",
                "grunt": "0.4.1",
                "gzip-js": "0.3.1",
index b970e14afa25f19c084ce6b022c2c0b017308171..334abf15d1e635d3b8a44c9d51513bdaadfa6ee5 100644 (file)
@@ -4,7 +4,7 @@ function benchmark(fn, times, name){
        var s = fn.indexOf('{')+1,
                e = fn.lastIndexOf('}');
        fn = fn.substring(s,e);
-       
+
        return benchmarkString(fn, times, name);
 }
 
index 1f094de683e8d4e3b5a5be46245e1b8dc5c3e560..64a1c03cfab5959681d6c9a2810c9053b5d018a0 100644 (file)
@@ -3,15 +3,17 @@
        "expr": true,
        "newcap": false,
        "quotmark": "double",
-       "regexdash": true,
        "trailing": true,
        "undef": true,
        "unused": true,
+       "latedef": false,
+       "eqeqeq": true,
        "maxerr": 100,
 
        "eqnull": true,
        "evil": true,
        "sub": true,
+       "boss": true,
 
        "browser": true,
        "wsh": true,
index 983e0d833381cc7b66c64072d78a2e5fd983a382..14586d18fcee059242a9e937518a14ec28b651e0 100644 (file)
@@ -445,8 +445,8 @@ jQuery.extend({
                        parts = rurl.exec( s.url.toLowerCase() );
                        s.crossDomain = !!( parts &&
                                ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
-                                       ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
-                                               ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
+                                       ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==
+                                               ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) )
                        );
                }
 
index 9a527696655fa4d7ebdc9ec6960f00b66d1d102a..272b19009e1a782c9e6a05806e5aa28174ee9344 100644 (file)
@@ -279,14 +279,14 @@ jQuery.extend({
                                        options = elem.options,
                                        values = jQuery.makeArray( value ),
                                        i = options.length;
-                               
+
                                while ( i-- ) {
                                        option = options[ i ];
                                        if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) {
                                                optionSet = true;
                                        }
                                }
-                               
+
                                // force browsers to behave consistently when non-matching value is set
                                if ( !optionSet ) {
                                        elem.selectedIndex = -1;
index 8837b53d30261768c9f1ca272e2bc35546057373..5d8bc3fed1fc50968a741f2a76491cde70fbe96a 100644 (file)
@@ -435,6 +435,7 @@ jQuery.extend({
        },
 
        isWindow: function( obj ) {
+               /* jshint eqeqeq: false */
                return obj != null && obj == obj.window;
        },
 
index 670a3ef8e07d9451a60eae79d50c2c63d28ed6cc..46ac45fbd0923cd1e6019df33c0d18d9f03778f0 100644 (file)
@@ -169,7 +169,9 @@ function internalRemoveData( elem, name, pvt ) {
                jQuery.cleanData( [ elem ], true );
 
        // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
+       /* jshint eqeqeq: false */
        } else if ( jQuery.support.deleteExpando || cache != cache.window ) {
+               /* jshint eqeqeq: true */
                delete cache[ id ];
 
        // When all else fails, null
index 5cac7d2d8c6e23cf5c67fb9b13bc7b73138fb31f..485c34a507915bf16557fca5eea8f4eb46bbc3e4 100644 (file)
@@ -175,7 +175,7 @@ function Animation( elem, properties, options ) {
 }
 
 function propFilter( props, specialEasing ) {
-       var value, name, index, easing, hooks;
+       var index, name, easing, value, hooks;
 
        // camelCase, specialEasing and expand cssHook pass
        for ( index in props ) {
@@ -242,7 +242,7 @@ jQuery.Animation = jQuery.extend( Animation, {
 });
 
 function defaultPrefilter( elem, props, opts ) {
-       /*jshint validthis:true */
+       /* jshint validthis: true */
        var prop, index, length,
                value, dataShow, toggle,
                tween, hooks, oldfire,
@@ -451,8 +451,8 @@ Tween.propHooks = {
        }
 };
 
-// Remove in 2.0 - this supports IE8's panic based approach
-// to setting things on disconnected nodes
+// Support: IE <=9
+// Panic based approach to setting things on disconnected nodes
 
 Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
        set: function( tween ) {
index 21996a0c8f35cd8901718b25e3ec4d6f2b5499de..b0ce35c8100e997376a2b9bd4308c19bd6a8f149 100644 (file)
@@ -67,7 +67,7 @@ jQuery.event = {
                        tmp = rtypenamespace.exec( types[t] ) || [];
                        type = origType = tmp[1];
                        namespaces = ( tmp[2] || "" ).split( "." ).sort();
-                       
+
                        // There *must* be a type, no attaching namespace-only handlers
                        if ( !type ) {
                                continue;
@@ -413,7 +413,9 @@ jQuery.event = {
                // Avoid non-left-click bubbling in Firefox (#3861)
                if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
 
+                       /* jshint eqeqeq: false */
                        for ( ; cur != this; cur = cur.parentNode || this ) {
+                               /* jshint eqeqeq: true */
 
                                // Don't check non-elements (#13208)
                                // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
index 136919d3744990df5a698a87b9fe1ead2585d72d..006e5d0a7559395f14b3a508635999498a0fee97 100644 (file)
@@ -337,7 +337,7 @@ var Globals = (function() {
                } else {
                        delete jQuery.ajaxSettings;
                }
-               
+
                // Cleanup globals
                Globals.cleanup();
 
index bf0403b980eafe31814aa81fccab3809aa2b7fd0..a60664245a77857979df6b0ba70fa96bfc7b4d01 100644 (file)
@@ -199,7 +199,7 @@ module( "ajax", {
                                tmp.push( i, ": ", requestHeaders[ i ], "\n" );
                        }
                        tmp = tmp.join("");
-                       
+
                        strictEqual( data, tmp, "Headers were sent" );
                        strictEqual( xhr.getResponseHeader("Sample-Header"), "Hello World", "Sample header received" );
 
@@ -299,7 +299,7 @@ module( "ajax", {
                        samePort = loc.port || ( loc.protocol === "http:" ? 80 : 443 ),
                        otherPort = loc.port === 666 ? 667 : 666,
                        otherProtocol = loc.protocol === "http:" ? "https:" : "http:";
-                       
+
                return [
                        request(
                                loc.protocol + "//" + loc.host + ":" + samePort,
@@ -390,7 +390,7 @@ module( "ajax", {
                        }]
                };
        });
-               
+
        ajaxTest( "jQuery.ajax() - events without context", 3, function() {
                function nocallback( msg ) {
                        return function() {
@@ -601,9 +601,9 @@ module( "ajax", {
        });
 
        ajaxTest( "jQuery.ajax() - cache", 12, function() {
-               
+
                var re = /_=(.*?)(&|$)/g;
-               
+
                function request( url, title ) {
                        return {
                                url: url,
@@ -620,7 +620,7 @@ module( "ajax", {
                                error: true
                        };
                }
-               
+
                return [
                        request(
                                "data/text.php",
@@ -1356,7 +1356,7 @@ module( "ajax", {
                        }
                }
        ]);
-       
+
        jQuery.each( [ " - Same Domain", " - Cross Domain" ], function( crossDomain, label ) {
                ajaxTest( "#8205 - jQuery.ajax() - JSONP - re-use callbacks name" + label, 2, {
                        url: "data/jsonp.php",
@@ -1401,7 +1401,7 @@ module( "ajax", {
        });
 
        jQuery.each( [ "as argument", "in settings object" ], function( inSetting, title ) {
-               
+
                function request( url, test ) {
                        return {
                                create: function() {
@@ -1412,14 +1412,14 @@ module( "ajax", {
                                }
                        };
                }
-               
+
                ajaxTest( "#10093 - jQuery.ajax() - falsy url " + title, 4, [
                        request( "", "empty string" ),
                        request( false ),
                        request( null ),
                        request( undefined )
                ]);
-               
+
        });
 
        ajaxTest( "#11151 - jQuery.ajax() - parse error body", 2, {
@@ -1492,7 +1492,7 @@ module( "ajax", {
                                request()
                        ]
                });
-               
+
        });
 
        ajaxTest( "#13276 - jQuery.ajax() - compatibility between XML documents from ajax requests and parsed string", 1, {
@@ -1510,7 +1510,7 @@ module( "ajax", {
                        strictEqual( ajaxXML.find("tab").length, 3, "Parsed node was added properly" );
                }
        });
-       
+
        ajaxTest( "#13292 - jQuery.ajax() - converter is bypassed for 204 requests", 3, {
                url: "data/nocontent.php",
                dataType: "testing",
@@ -1744,7 +1744,7 @@ module( "ajax", {
        });
 
 //----------- jQuery.fn.load()
-       
+
        // check if load can be called with only url
        asyncTest( "jQuery.fn.load( String )", 2, function() {
                jQuery.ajaxSetup({
index f0ca137e612880a3e16b369bc69f4da32d6db904..2292d7ff57295aa17147d06cef37720c93e61735 100644 (file)
@@ -852,17 +852,17 @@ test( "val()", function() {
 
 test("val() with non-matching values on dropdown list", function() {
        expect( 3 );
-       
+
        jQuery("#select5").val( "" );
        equal( jQuery("#select5").val(), null, "Non-matching set on select-one" );
-       
+
        var select6 = jQuery("<select multiple id=\"select6\"><option value=\"1\">A</option><option value=\"2\">B</option></select>").appendTo("#form");
        jQuery(select6).val( "nothing" );
        equal( jQuery(select6).val(), null, "Non-matching set (single value) on select-multiple" );
-       
+
        jQuery(select6).val( ["nothing1", "nothing2"] );
        equal( jQuery(select6).val(), null, "Non-matching set (array of values) on select-multiple" );
-       
+
        select6.remove();
 });