From: Michał Gołębiowski Date: Fri, 6 Sep 2013 18:31:18 +0000 (+0200) Subject: No ticket. Restore checking individual src/**/*.js files by jsHint. X-Git-Tag: 2.1.0-beta1~51 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1a25f21dc3033695be1b0ff8924c4b633e1dda46;p=jquery.git No ticket. Restore checking individual src/**/*.js files by jsHint. --- diff --git a/.jshintignore b/.jshintignore index 894187dc1..ae3c3de80 100644 --- a/.jshintignore +++ b/.jshintignore @@ -1,3 +1,5 @@ +src/intro.js +src/outro.js test/qunit/** test/data/jquery-1.9.1.ajax_xhr.min.js test/data/badcall.js diff --git a/Gruntfile.js b/Gruntfile.js index d7ec8d088..bbbdd4005 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -55,6 +55,12 @@ module.exports = function( grunt ) { } }, jshint: { + src: { + src: [ "src/**/*.js" ], + options: { + jshintrc: "src/.jshintrc" + } + }, dist: { src: [ "dist/jquery.js" ], options: srcHintOptions diff --git a/src/ajax/load.js b/src/ajax/load.js index b54750e0a..167031697 100644 --- a/src/ajax/load.js +++ b/src/ajax/load.js @@ -71,4 +71,4 @@ jQuery.fn.load = function( url, params, callback ) { return this; }; -}); \ No newline at end of file +}); diff --git a/src/ajax/var/rquery.js b/src/ajax/var/rquery.js index eb26d4eb8..500a77a08 100644 --- a/src/ajax/var/rquery.js +++ b/src/ajax/var/rquery.js @@ -1,3 +1,3 @@ define(function() { - return /\?/; -}); \ No newline at end of file + return (/\?/); +}); diff --git a/src/css/var/cssExpand.js b/src/css/var/cssExpand.js index 5bb6e8f85..91e90a88a 100644 --- a/src/css/var/cssExpand.js +++ b/src/css/var/cssExpand.js @@ -1,3 +1,3 @@ define(function() { return [ "Top", "Right", "Bottom", "Left" ]; -}); \ No newline at end of file +}); diff --git a/src/css/var/isHidden.js b/src/css/var/isHidden.js index 085833db0..15ab81a97 100644 --- a/src/css/var/isHidden.js +++ b/src/css/var/isHidden.js @@ -10,4 +10,4 @@ define([ elem = el || elem; return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); }; -}); \ No newline at end of file +}); diff --git a/src/exports/amd.js b/src/exports/amd.js index 4499d2def..815b5d88a 100644 --- a/src/exports/amd.js +++ b/src/exports/amd.js @@ -15,4 +15,4 @@ if ( typeof define === "function" && define.amd ) { }); } -}); \ No newline at end of file +}); diff --git a/src/manipulation/var/rcheckableType.js b/src/manipulation/var/rcheckableType.js index 29049b3ae..c27a15dc4 100644 --- a/src/manipulation/var/rcheckableType.js +++ b/src/manipulation/var/rcheckableType.js @@ -1,3 +1,3 @@ define(function() { - return /^(?:checkbox|radio)$/i; -}); \ No newline at end of file + return (/^(?:checkbox|radio)$/i); +}); diff --git a/src/offset.js b/src/offset.js index 45a4a7fa8..386109506 100644 --- a/src/offset.js +++ b/src/offset.js @@ -60,7 +60,8 @@ jQuery.offset = { curOffset = curElem.offset(); curCSSTop = jQuery.css( elem, "top" ); curCSSLeft = jQuery.css( elem, "left" ); - calculatePosition = ( position === "absolute" || position === "fixed" ) && ( curCSSTop + curCSSLeft ).indexOf("auto") > -1; + calculatePosition = ( position === "absolute" || position === "fixed" ) && + ( curCSSTop + curCSSLeft ).indexOf("auto") > -1; // Need to be able to calculate position if either top or left is auto and position is either absolute or fixed if ( calculatePosition ) { diff --git a/src/outro.js b/src/outro.js index 57d3e4820..be4600a5c 100644 --- a/src/outro.js +++ b/src/outro.js @@ -1 +1 @@ -})); \ No newline at end of file +})); diff --git a/src/selector.js b/src/selector.js index f47632b87..01e9733b8 100644 --- a/src/selector.js +++ b/src/selector.js @@ -1 +1 @@ -define([ "./selector-sizzle" ]); \ No newline at end of file +define([ "./selector-sizzle" ]); diff --git a/src/var/arr.js b/src/var/arr.js index 39efc6a70..b18fc9ce0 100644 --- a/src/var/arr.js +++ b/src/var/arr.js @@ -1,3 +1,3 @@ define(function() { return []; -}); \ No newline at end of file +}); diff --git a/src/var/class2type.js b/src/var/class2type.js index d31b7afcd..52f2d38a6 100644 --- a/src/var/class2type.js +++ b/src/var/class2type.js @@ -1,3 +1,3 @@ define(function() { return {}; -}); \ No newline at end of file +}); diff --git a/src/var/concat.js b/src/var/concat.js index c95cff5ca..7dcf77e3c 100644 --- a/src/var/concat.js +++ b/src/var/concat.js @@ -2,4 +2,4 @@ define([ "./arr" ], function( arr ) { return arr.concat; -}); \ No newline at end of file +}); diff --git a/src/var/hasOwn.js b/src/var/hasOwn.js index 2fd59e1f7..32c002aff 100644 --- a/src/var/hasOwn.js +++ b/src/var/hasOwn.js @@ -2,4 +2,4 @@ define([ "./class2type" ], function( class2type ) { return class2type.hasOwnProperty; -}); \ No newline at end of file +}); diff --git a/src/var/indexOf.js b/src/var/indexOf.js index 8909c1948..cdbe3c742 100644 --- a/src/var/indexOf.js +++ b/src/var/indexOf.js @@ -2,4 +2,4 @@ define([ "./arr" ], function( arr ) { return arr.indexOf; -}); \ No newline at end of file +}); diff --git a/src/var/pnum.js b/src/var/pnum.js index d1af1e67b..407044724 100644 --- a/src/var/pnum.js +++ b/src/var/pnum.js @@ -1,3 +1,3 @@ define(function() { - return /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source; -}); \ No newline at end of file + return (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source; +}); diff --git a/src/var/push.js b/src/var/push.js index bc38c7ed7..ad6f0a179 100644 --- a/src/var/push.js +++ b/src/var/push.js @@ -2,4 +2,4 @@ define([ "./arr" ], function( arr ) { return arr.push; -}); \ No newline at end of file +}); diff --git a/src/var/rnotwhite.js b/src/var/rnotwhite.js index 887c82985..7c69bec53 100644 --- a/src/var/rnotwhite.js +++ b/src/var/rnotwhite.js @@ -1,3 +1,3 @@ define(function() { - return /\S+/g; -}); \ No newline at end of file + return (/\S+/g); +}); diff --git a/src/var/slice.js b/src/var/slice.js index 08503fac2..614d46ca5 100644 --- a/src/var/slice.js +++ b/src/var/slice.js @@ -2,4 +2,4 @@ define([ "./arr" ], function( arr ) { return arr.slice; -}); \ No newline at end of file +}); diff --git a/src/var/strundefined.js b/src/var/strundefined.js index 99a26f44a..04e16b03e 100644 --- a/src/var/strundefined.js +++ b/src/var/strundefined.js @@ -1,3 +1,3 @@ define(function() { return typeof undefined; -}); \ No newline at end of file +}); diff --git a/src/var/toString.js b/src/var/toString.js index db39811b6..ca92d2222 100644 --- a/src/var/toString.js +++ b/src/var/toString.js @@ -2,4 +2,4 @@ define([ "./class2type" ], function( class2type ) { return class2type.toString; -}); \ No newline at end of file +}); diff --git a/src/var/trim.js b/src/var/trim.js index e5d414aca..18f835658 100644 --- a/src/var/trim.js +++ b/src/var/trim.js @@ -1,3 +1,3 @@ define(function() { return "".trim; -}); \ No newline at end of file +});