diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2014-08-13 18:29:28 +0200 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2014-08-14 14:12:12 +0200 |
commit | 54004c85d02ba5688549736e0fb8f883c88b668b (patch) | |
tree | 32d6998cac3b0772488cb5ed2dbb77b9eae66e1d | |
parent | ba5a60efa17671760ebb8d53f4f21e78b2d59082 (diff) | |
download | jquery-ui-54004c85d02ba5688549736e0fb8f883c88b668b.tar.gz jquery-ui-54004c85d02ba5688549736e0fb8f883c88b668b.zip |
Build: Update jscs and fix some code style issues
Disables the checks for casing and line length, since those need a lot
more effort to address. For variable naming the fix isn't obvious to me.
There's way too many lines over 100 chars.
-rw-r--r-- | .jscs.json | 3 | ||||
-rw-r--r-- | .jscsrc | 9 | ||||
-rw-r--r-- | build/tasks/testswarm.js | 2 | ||||
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | ui/effect-drop.js | 2 | ||||
-rw-r--r-- | ui/effect.js | 4 | ||||
-rw-r--r-- | ui/slider.js | 2 | ||||
-rw-r--r-- | ui/widget.js | 2 |
8 files changed, 16 insertions, 10 deletions
diff --git a/.jscs.json b/.jscs.json deleted file mode 100644 index f5387e9af..000000000 --- a/.jscs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "preset": "jquery" -} diff --git a/.jscsrc b/.jscsrc new file mode 100644 index 000000000..de0d7420e --- /dev/null +++ b/.jscsrc @@ -0,0 +1,9 @@ +{ + "preset": "jquery", + + // disabled until `widget_slice` et al are addressed + "requireCamelCaseOrUpperCaseIdentifiers": null, + + // Ref https://github.com/jquery/contribute.jquery.org/issues/80#issuecomment-45253460 + "maximumLineLength": null +} diff --git a/build/tasks/testswarm.js b/build/tasks/testswarm.js index b3dc46380..aa1c52abc 100644 --- a/build/tasks/testswarm.js +++ b/build/tasks/testswarm.js @@ -50,7 +50,7 @@ function submit( commit, runs, configFile, extra, done ) { } testswarm.createClient({ - url: config.swarmUrl, + url: config.swarmUrl }) .addReporter( testswarm.reporters.cli ) .auth({ diff --git a/package.json b/package.json index 515b7efea..8fdf70bd3 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "grunt-esformatter": "0.2.0", "grunt-git-authors": "1.2.0", "grunt-html": "1.0.0", - "grunt-jscs-checker": "0.3.1", + "grunt-jscs": "0.6.2", "load-grunt-tasks": "0.3.0", "rimraf": "2.1.4", "testswarm": "1.1.0" diff --git a/ui/effect-drop.js b/ui/effect-drop.js index 3e1256c5a..ec1b8cefd 100644 --- a/ui/effect-drop.js +++ b/ui/effect-drop.js @@ -42,7 +42,7 @@ return $.effects.effect.drop = function( o, done ) { el.show(); $.effects.createWrapper( el ); - distance = o.distance || el[ ref === "top" ? "outerHeight": "outerWidth" ]( true ) / 2; + distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ) / 2; if ( show ) { el diff --git a/ui/effect.js b/ui/effect.js index 6ca565390..6fe99708b 100644 --- a/ui/effect.js +++ b/ui/effect.js @@ -633,7 +633,7 @@ color.hook = function( hook ) { } try { elem.style[ hook ] = value; - } catch( e ) { + } catch ( e ) { // wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit' } } @@ -998,7 +998,7 @@ $.extend( $.effects, { // https://bugzilla.mozilla.org/show_bug.cgi?id=561664 try { active.id; - } catch( e ) { + } catch ( e ) { active = document.body; } diff --git a/ui/slider.js b/ui/slider.js index 58b5c0759..74cbcc759 100644 --- a/ui/slider.js +++ b/ui/slider.js @@ -512,7 +512,7 @@ return $.widget( "ui.slider", $.ui.mouse, { // .slice() creates a copy of the array // this copy gets trimmed by min and max and then returned vals = this.options.values.slice(); - for ( i = 0; i < vals.length; i+= 1) { + for ( i = 0; i < vals.length; i += 1) { vals[ i ] = this._trimAlignValue( vals[ i ] ); } diff --git a/ui/widget.js b/ui/widget.js index edeb7fa6f..d5a76c67d 100644 --- a/ui/widget.js +++ b/ui/widget.js @@ -36,7 +36,7 @@ $.cleanData = (function( orig ) { } // http://bugs.jquery.com/ticket/8235 - } catch( e ) {} + } catch ( e ) {} } orig( elems ); }; |