]> source.dussan.org Git - jquery.git/commitdiff
no ticket: remove and enforce unused vars in jshint
authorMike Sherov <mike.sherov@gmail.com>
Wed, 17 Oct 2012 16:50:12 +0000 (12:50 -0400)
committerMike Sherov <mike.sherov@gmail.com>
Wed, 17 Oct 2012 16:52:12 +0000 (12:52 -0400)
src/.jshintrc
src/core.js
src/css.js
src/effects.js
src/event.js
src/manipulation.js
src/serialize.js
src/traversing.js

index 2ce0eca6f1c72889c5d83a76f617ecce932856f0..d74bf14fd7d90d627f0e51007d5b15d25ee9c1ed 100644 (file)
@@ -11,6 +11,7 @@
     "sub": true,
     "trailing": true,
     "undef": true,
+    "unused": true,
     "wsh": true
   },
   "globals": {
index 709467168907bf67568176049b9449730c932ab6..5564a9870fcc183166b9efcb23ca64b08594bcc1 100644 (file)
@@ -81,7 +81,7 @@ var
 jQuery.fn = jQuery.prototype = {
        constructor: jQuery,
        init: function( selector, context, rootjQuery ) {
-               var match, elem, ret, doc;
+               var match, elem, doc;
 
                // Handle $(""), $(null), $(undefined), $(false)
                if ( !selector ) {
index 6f54563157eae942c38ee0c838155f488258f978..ad42a048ae6319b568f1a3f83cb2aed8234ac6cf 100644 (file)
@@ -18,9 +18,7 @@ var curCSS, iframe, iframeDoc,
        },
 
        cssExpand = [ "Top", "Right", "Bottom", "Left" ],
-       cssPrefixes = [ "Webkit", "O", "Moz", "ms" ],
-
-       eventsToggle = jQuery.fn.toggle;
+       cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];
 
 // return a css property mapped to a potentially vendor prefixed property
 function vendorPropName( style, name ) {
@@ -113,7 +111,7 @@ jQuery.fn.extend({
        hide: function() {
                return showHide( this );
        },
-       toggle: function( state, fn2 ) {
+       toggle: function( state ) {
                var bool = typeof state === "boolean";
 
                return this.each(function() {
index cff0dc835c1faaac81bb04592a8a2b03053d3131..dcc6c00b7cff0efc02e8ac08f34771b63c6f9e51 100644 (file)
@@ -73,7 +73,6 @@ function createTweens( animation, props ) {
 function Animation( elem, properties, options ) {
        var result,
                index = 0,
-               tweenerIndex = 0,
                length = animationPrefilters.length,
                deferred = jQuery.Deferred().always( function() {
                        // don't match elem in the :animated selector
@@ -108,7 +107,7 @@ function Animation( elem, properties, options ) {
                        startTime: fxNow || createFxNow(),
                        duration: options.duration,
                        tweens: [],
-                       createTween: function( prop, end, easing ) {
+                       createTween: function( prop, end ) {
                                var tween = jQuery.Tween( elem, animation.opts, prop, end,
                                                animation.opts.specialEasing[ prop ] || animation.opts.easing );
                                animation.tweens.push( tween );
index f68a09c547d8967decee174ca8d44f04d405bb27..8e0f59afcd41eb55c4a4627c5613f6a168b7714b 100644 (file)
@@ -357,7 +357,7 @@ jQuery.event = {
                // Make a writable jQuery.Event from the native event object
                event = jQuery.event.fix( event || window.event );
 
-               var i, j, cur, ret, selMatch, matched, matches, handleObj, sel, related,
+               var i, j, cur, ret, selMatch, matched, matches, handleObj, sel,
                        handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []),
                        delegateCount = handlers.delegateCount,
                        args = core_slice.call( arguments ),
@@ -704,8 +704,7 @@ jQuery.each({
                        var ret,
                                target = this,
                                related = event.relatedTarget,
-                               handleObj = event.handleObj,
-                               selector = handleObj.selector;
+                               handleObj = event.handleObj;
 
                        // For mousenter/leave call the handler if related is outside the target.
                        // NB: No relatedTarget if the mouse left/entered the browser window
index 7d18d04c9423211de6e0f248d0c82e546eeb1c22..ef305032e240e3b98c8da029b807aea3f2e8d40a 100644 (file)
@@ -650,7 +650,7 @@ jQuery.extend({
        },
 
        clean: function( elems, context, fragment, scripts ) {
-               var i, j, elem, tag, wrap, depth, div, hasBody, tbody, len, handleScript, jsTags,
+               var i, j, elem, tag, wrap, depth, div, hasBody, tbody, handleScript, jsTags,
                        safe = context === document && safeFragment,
                        ret = [];
 
index 212640cf176e9e169a49c0d19ce1f7711cddfe2c..b81c15212692ad82600c17f8b24296c922af17c4 100644 (file)
@@ -23,7 +23,7 @@ jQuery.fn.extend({
                        return val == null ?
                                null :
                                jQuery.isArray( val ) ?
-                                       jQuery.map( val, function( val, i ){
+                                       jQuery.map( val, function( val ){
                                                return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
                                        }) :
                                        { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
index 365bb29472d5c2b5c9a6ae4378ff92fe649c9500..3e04bf4fb3b5ca8b99586d4a49e7320be037bddd 100644 (file)
@@ -271,7 +271,7 @@ function winnow( elements, qualifier, keep ) {
                });
 
        } else if ( qualifier.nodeType ) {
-               return jQuery.grep(elements, function( elem, i ) {
+               return jQuery.grep(elements, function( elem ) {
                        return ( elem === qualifier ) === keep;
                });
 
@@ -287,7 +287,7 @@ function winnow( elements, qualifier, keep ) {
                }
        }
 
-       return jQuery.grep(elements, function( elem, i ) {
+       return jQuery.grep(elements, function( elem ) {
                return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;
        });
 }