Skip to content

Commit

Permalink
JSHint the lib/ directory
Browse files Browse the repository at this point in the history
  • Loading branch information
jwolski committed Mar 7, 2015
1 parent 07ea0f7 commit 297ff77
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions lib/members.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ Dissemination.prototype.adjustMaxPiggybackCount = function adjustMaxPiggybackCou
Dissemination.prototype.getChanges = function getChanges(checksum, source) {
var changesToDisseminate = [];

for (var address in this.changes) {
var changedNodes = Object.keys(this.changes);

for (var i = 0; i < changedNodes.length; i++) {
var address = changedNodes[i];
var change = this.changes[address];

// TODO We're bumping the piggyback count even though
Expand Down Expand Up @@ -321,7 +324,7 @@ Membership.prototype.getRandomPingableMembers = function(n, excluding) {
.value();
};

Membership.prototype.getState = function(incomingChecksum) {
Membership.prototype.getState = function() {
return this.members.map(function(member) {
return {
address: member.address,
Expand Down
3 changes: 2 additions & 1 deletion lib/rbtree.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ RingNode.prototype.setChild = function(dir, val) {
}
};

RBTree = function RBTree() {
var RBTree = function RBTree() {
this.root = null;
this.size = 0;
};
Expand Down Expand Up @@ -188,6 +188,7 @@ RBTree.prototype.remove = function(val) {
} else if (!isRed(node.getChild(!dir))) {
var sibling = p.getChild(!lastDir);
if (sibling !== null) {
/* jshint -W073 */
if (!isRed(sibling.getChild(!lastDir)) && !isRed(sibling.getChild(lastDir))) {
// color flip
p.red = false;
Expand Down
1 change: 0 additions & 1 deletion lib/swim.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ var clearTimeout = require('timers').clearTimeout;
var globalSetTimeout = require('timers').setTimeout;
var metrics = require('metrics');
var safeParse = require('./util').safeParse;
var TypedError = require('error/typed');

function PingReqSender(ring, member, target, callback) {
this.ring = ring;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"add-licence": "uber-licence",
"check-licence": "uber-licence --dry",
"cover": "istanbul cover --print detail --report html test/index.js",
"jshint": "jshint --verbose *.js",
"jshint": "jshint --verbose *.js lib/*.js",
"travis": "npm run cover -s && istanbul report lcov && ((cat coverage/lcov.info | coveralls) || exit 0)",
"view-cover": "opn coverage/index.html"
},
Expand Down

0 comments on commit 297ff77

Please sign in to comment.