Skip to content

Commit

Permalink
Enable "disallowTrailingWhitespace" in jscsrc
Browse files Browse the repository at this point in the history
This removes the deprecated "trailing" option in the jshintrc file,
and replaces it with a JSCS setting. All files with trailing whitespace
have been updated.
  • Loading branch information
kadamwhite committed Jul 3, 2015
1 parent c37045c commit 9ef449f
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 25 deletions.
1 change: 1 addition & 0 deletions .jscsrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"disallowTrailingWhitespace": true,
"validateIndentation": 2
}
5 changes: 1 addition & 4 deletions .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,5 @@
"undef": true,
"unused": "vars",

"node": true,

"trailing": true,
"curly": true
"node": true
}
2 changes: 1 addition & 1 deletion test/unit/color/color_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ suite('p5.ColorUtils', function() {
assert.deepEqual(p5.ColorUtils.rgbaToHSLA(rgba, [255, 255, 255, 255]), hsla);
});
});
});
});
6 changes: 3 additions & 3 deletions test/unit/color/creating_reading.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
suite('CreatingReading', function() {

// p5 instance
var myp5 = new p5(function( sketch ) {
sketch.setup = function() {};
sketch.draw = function() {};
});

setup(function() {
myp5.colorMode(myp5.RGB, 255);
myp5.colorMode(myp5.RGB, 255);
});

suite('p5.prototype.color', function() {
Expand Down Expand Up @@ -96,4 +96,4 @@ suite('CreatingReading', function() {
});
});

});
});
4 changes: 2 additions & 2 deletions test/unit/color/p5.Color.js
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ suite('p5.Color', function() {

});

// These tests commented out pending further discussion.
// These tests commented out pending further discussion.
// suite('new p5.Color with Base 1 colors', function() {
// var base_1_rgba = [0.2, 0.4, 0.6, 0.5];
// var base_255_rgba = [51, 102, 153, 127.5];
Expand All @@ -677,4 +677,4 @@ suite('p5.Color', function() {
// assert.equal(c.toString(), 'rgba(51,102,153,0.5)');
// });
// });
});
});
6 changes: 3 additions & 3 deletions test/unit/color/setting.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
suite('Color', function() {

// p5 instance
var myp5 = new p5(function( p ) {
p.setup = function() {};
Expand All @@ -13,10 +13,10 @@ suite('Color', function() {
assert.ok(colorMode);
});
test('should set mode to HSB', function() {
myp5.colorMode(myp5.HSB);
myp5.colorMode(myp5.HSB);
assert.equal(myp5._colorMode, myp5.HSB);
});
});
});

});
});
2 changes: 1 addition & 1 deletion test/unit/core/2d_primitives.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
suite('2D Primitives', function() {

var myp5 = new p5(function( p ) {
p.setup = function() {};
p.draw = function() {};
Expand Down
6 changes: 3 additions & 3 deletions test/unit/core/core.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
suite('Core', function(){
var node;

setup(function () {
node = document.createElement('div');
document.body.appendChild(node);
});

teardown(function () {
document.body.removeChild(node);
});
Expand Down Expand Up @@ -95,4 +95,4 @@ suite('Core', function(){
});*/
});

});
});
4 changes: 2 additions & 2 deletions test/unit/math/calculation.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ suite('Calculation', function() {
});
});
});

suite('p5.prototype.mag', function() {
var mag = p5.prototype.mag;
var result;
Expand Down Expand Up @@ -231,7 +231,7 @@ suite('Calculation', function() {
test('should return single value from array', function() {
result = max([10,10]);
assert.equal(result, 10);
});
});
});
});

Expand Down
12 changes: 6 additions & 6 deletions test/unit/math/p5.Vector.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ suite('p5.Vector', function() {
assert.equal(v.y, 2);
assert.equal(v.z, 3);
});
});
});

suite('new p5.Vector(1,2,undefined)', function() {
setup(function() {
Expand All @@ -71,7 +71,7 @@ suite('p5.Vector', function() {
assert.equal(v.y, 2);
assert.equal(v.z, 0);
});
});
});

suite('new p5.Vector(1,2,undefined)', function() {
setup(function() {
Expand Down Expand Up @@ -376,7 +376,7 @@ suite('p5.Vector', function() {
// this.sut.y = 1;
// this.sut.z = 1;
// });

// it('should return a number', function() {
// expect(typeof(this.sut.dot(new p5.Vector())) === 'number').to.eql(true);
// });
Expand Down Expand Up @@ -448,7 +448,7 @@ suite('p5.Vector', function() {
// expect(res).to.not.eql(undefined);
// });


// it('should return neither v1 nor v2', function() {
// expect(res).to.not.eql(v1);
// expect(res).to.not.eql(v2);
Expand Down Expand Up @@ -749,7 +749,7 @@ suite('p5.Vector', function() {
// it('should be a unit p5.Vector', function() {
// expect(res.mag()).to.be.closeTo(1,0.01);
// });
// });
// });
// describe('p5.Vector.random3D()', function() {
// var res;
// beforeEach(function() {
Expand All @@ -758,7 +758,7 @@ suite('p5.Vector', function() {
// it('should be a unit p5.Vector', function() {
// expect(res.mag()).to.be.closeTo(1,0.01);
// });
// });
// });
// describe('p5.Vector.angleBetween(v1, v2)', function() {
// var res, v1, v2;
// beforeEach(function() {
Expand Down

0 comments on commit 9ef449f

Please sign in to comment.