]> source.dussan.org Git - jquery-ui.git/commitdiff
Build: Update jscs and fix some code style issues 1311/head
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Wed, 13 Aug 2014 16:29:28 +0000 (18:29 +0200)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Thu, 14 Aug 2014 12:12:12 +0000 (14:12 +0200)
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.

.jscs.json [deleted file]
.jscsrc [new file with mode: 0644]
build/tasks/testswarm.js
package.json
ui/effect-drop.js
ui/effect.js
ui/slider.js
ui/widget.js

diff --git a/.jscs.json b/.jscs.json
deleted file mode 100644 (file)
index f5387e9..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{
-    "preset": "jquery"
-}
diff --git a/.jscsrc b/.jscsrc
new file mode 100644 (file)
index 0000000..de0d742
--- /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
+}
index b3dc463800a1871f44123f0664ba721f29ca046d..aa1c52abc53acf97cd7c2b6ffb08d8e33c06ccb7 100644 (file)
@@ -50,7 +50,7 @@ function submit( commit, runs, configFile, extra, done ) {
        }
 
        testswarm.createClient({
-               url: config.swarmUrl,
+               url: config.swarmUrl
        })
        .addReporter( testswarm.reporters.cli )
        .auth({
index 515b7efea43a03756960dad84f4de9b8919b9c0f..8fdf70bd333a314756ed2545e2e77893d2817fec 100644 (file)
@@ -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"
index 3e1256c5aa10036ff8ded76aa6e9ed8c51bcf262..ec1b8cefdfc91754bdf652306f8d7e963752ba95 100644 (file)
@@ -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
index 6ca565390642db8192b7249f3975c218696f3997..6fe99708be30a3eb63a1489b9b6440d7f2cb97c9 100644 (file)
@@ -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;
                }
 
index 58b5c075992b12f072403a9d341bebd4c571e468..74cbcc7596e37576ec6a4152635efac4033749d9 100644 (file)
@@ -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 ] );
                        }
 
index edeb7fa6fddce64a4868392553b53301adfe9b43..d5a76c67dabb8d217f43dff56a655a96b4d29d71 100644 (file)
@@ -36,7 +36,7 @@ $.cleanData = (function( orig ) {
                                }
 
                        // http://bugs.jquery.com/ticket/8235
-                       } catch( e ) {}
+                       } catch ( e ) {}
                }
                orig( elems );
        };