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
(cherry picked from commit
4a7fc8544e2020c75047456d11979e4e3a517fdf)
},
"rules": {
+ "one-var": ["error", {"var": "always"}],
"strict": ["error", "function"]
}
}
"rules": {
// That is okay for the built version
"no-multiple-empty-lines": "off",
+ "one-var": "off",
// Sizzle is not compatible with jQuery code style
"no-nested-ternary": "off",
// Behavior in IE 9 is more subtle than in newer versions & it passes
// some versions of this test; make sure not to make it pass there!
reliableTrDimensions: function() {
- var table, tr, trChild;
+ var table, tr, trChild, trStyle;
if ( reliableTrDimensionsVal == null ) {
table = document.createElement( "table" );
tr = document.createElement( "tr" );
.appendChild( tr )
.appendChild( trChild );
- var trStyle = window.getComputedStyle( tr );
+ trStyle = window.getComputedStyle( tr );
reliableTrDimensionsVal = parseInt( trStyle.height ) > 3;
documentElement.removeChild( table );
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 ] || {};
"brace-style": "off",
"key-spacing": "off",
"camelcase": "off",
+ "one-var": "off",
"strict": "off",
// Not really too many - waiting for autofix features for these rules