Skip to content

Commit

Permalink
Build: Update jscs and fix some code style issues
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jzaefferer committed Aug 14, 2014
1 parent ba5a60e commit 54004c8
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 10 deletions.
3 changes: 0 additions & 3 deletions .jscs.json

This file was deleted.

9 changes: 9 additions & 0 deletions .jscsrc
Original file line number Diff line number Diff line change
@@ -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
}
2 changes: 1 addition & 1 deletion build/tasks/testswarm.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function submit( commit, runs, configFile, extra, done ) {
}

testswarm.createClient({
url: config.swarmUrl,
url: config.swarmUrl
})
.addReporter( testswarm.reporters.cli )
.auth({
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion ui/effect-drop.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions ui/effect.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}
Expand Down Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion ui/slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ] );
}

Expand Down
2 changes: 1 addition & 1 deletion ui/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ $.cleanData = (function( orig ) {
}

// http://bugs.jquery.com/ticket/8235
} catch( e ) {}
} catch ( e ) {}
}
orig( elems );
};
Expand Down

0 comments on commit 54004c8

Please sign in to comment.