diff options
author | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2019-05-13 22:25:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-13 22:25:11 +0200 |
commit | 438b1a3e8a52d3e4efd8aba45498477038849c97 (patch) | |
tree | e5d7f6331777cda9da65b64e137624ac166f3812 /src/effects.js | |
parent | 9ec09c3b4aa5182c2a8b8f51afb861b685a4003c (diff) | |
download | jquery-438b1a3e8a52d3e4efd8aba45498477038849c97.tar.gz jquery-438b1a3e8a52d3e4efd8aba45498477038849c97.zip |
Build: ESLint: forbid unused function parameters
This commit requires all function parameters to be used, not just the last one.
In cases where that's not possible as we need to match an external API, there's
an escape hatch of prefixing an unused argument with `_`.
This change makes it easier to catch unused AMD dependencies and unused
parameters in internal functions the API of which we may change at will, among
other things.
Unused AMD dependencies have been removed as part of this commit.
Closes gh-4381
Diffstat (limited to 'src/effects.js')
-rw-r--r-- | src/effects.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/effects.js b/src/effects.js index a65283e28..46ad988ad 100644 --- a/src/effects.js +++ b/src/effects.js @@ -5,7 +5,6 @@ define( [ "./var/rnothtmlwhite", "./css/var/cssExpand", "./css/var/isHiddenWithinTree", - "./css/var/swap", "./css/adjustCSS", "./css/cssCamelCase", "./data/var/dataPriv", @@ -19,7 +18,7 @@ define( [ "./css", "./effects/Tween" ], function( jQuery, document, rcssNum, rnothtmlwhite, cssExpand, - isHiddenWithinTree, swap, adjustCSS, cssCamelCase, dataPriv, showHide ) { + isHiddenWithinTree, adjustCSS, cssCamelCase, dataPriv, showHide ) { "use strict"; @@ -621,7 +620,7 @@ jQuery.fn.extend( { } } ); -jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) { +jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) { var cssFn = jQuery.fn[ name ]; jQuery.fn[ name ] = function( speed, easing, callback ) { return speed == null || typeof speed === "boolean" ? |