diff options
author | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2020-03-02 22:25:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-02 22:25:35 +0100 |
commit | 4a7fc8544e2020c75047456d11979e4e3a517fdf (patch) | |
tree | e31e53ef30dab19b043fa3bb2981c2369904ed1c /src | |
parent | 364476c3dc1231603ba61fc08068fa89fb095e1a (diff) | |
download | jquery-4a7fc8544e2020c75047456d11979e4e3a517fdf.tar.gz jquery-4a7fc8544e2020c75047456d11979e4e3a517fdf.zip |
Build: Enable ESLint one-var rule for var declarations in browser code
Node.js code is written more & more commonly in ES6+ so it doesn't make sense
to enable it there. There are many violations in test code so it's disabled
there as well.
Closes gh-4615
Diffstat (limited to 'src')
-rw-r--r-- | src/css/support.js | 4 | ||||
-rw-r--r-- | src/event.js | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/css/support.js b/src/css/support.js index 505adafb6..dc18708c1 100644 --- a/src/css/support.js +++ b/src/css/support.js @@ -8,7 +8,7 @@ var reliableTrDimensionsVal; // IE/Edge misreport `getComputedStyle` of table rows with width/height // set in CSS while `offset*` properties report correct values. support.reliableTrDimensions = function() { - var table, tr, trChild; + var table, tr, trChild, trStyle; if ( reliableTrDimensionsVal == null ) { table = document.createElement( "table" ); tr = document.createElement( "tr" ); @@ -23,7 +23,7 @@ support.reliableTrDimensions = function() { .appendChild( tr ) .appendChild( trChild ); - var trStyle = window.getComputedStyle( tr ); + trStyle = window.getComputedStyle( tr ); reliableTrDimensionsVal = parseInt( trStyle.height ) > 3; documentElement.removeChild( table ); diff --git a/src/event.js b/src/event.js index a79552c17..f6dd709dc 100644 --- a/src/event.js +++ b/src/event.js @@ -288,11 +288,12 @@ jQuery.event = { dispatch: function( nativeEvent ) { - // Make a writable jQuery.Event from the native event object - var event = jQuery.event.fix( nativeEvent ); - var i, j, ret, matched, handleObj, handlerQueue, args = new Array( arguments.length ), + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( nativeEvent ), + handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [], special = jQuery.event.special[ event.type ] || {}; |