Skip to content

Commit 6bd5583

Browse files
author
Isaac Wagner
committed
Fixed jshint errors (except one about redefining Set)
1 parent 9e2e370 commit 6bd5583

File tree

1 file changed

+13
-26
lines changed

1 file changed

+13
-26
lines changed

src/main.js

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,14 @@ function processTarget(target, options, shared) {
144144
return loadInitialNodes(context);
145145
}
146146
})();
147-
};
147+
}
148148

149149
function Match(fn, setStage, resetStage, initialGlobs) {
150150
this.fn = fn;
151151
this.setStage = setStage;
152152
this.resetStage = resetStage;
153153
this.initialGlobs = initialGlobs;
154-
};
154+
}
155155

156156
Match.prototype.not = function(globs) {
157157
var fn = this.fn;
@@ -306,13 +306,14 @@ function not(fn) {
306306
return function(val) {
307307
return !fn(val);
308308
};
309-
};
309+
}
310310

311311
function printGraph(nodes) {
312312
process.stdout.write("digraph{");
313313
nodes.array().forEach(function(node) {
314+
var name;
314315
if(node.file) {
315-
var name = node.file;
316+
name = node.file;
316317
//if(node.promise.isResolved())
317318
//name += "+";
318319
process.stdout.write(node.id + " [shape=box,label=\"" + name + "\"];");
@@ -512,19 +513,6 @@ function printCreating(output) {
512513

513514
function promise(e) {
514515
return e.promise;
515-
};
516-
517-
function sumTruthy(arr) {
518-
return arr.reduce(function(prev, cur) {
519-
if(cur) return prev + 1;
520-
return prev;
521-
}, 0);
522-
};
523-
524-
function prop(p) {
525-
return function(el) {
526-
return el[p];
527-
};
528516
}
529517

530518
function matchAgainstStage(context, node, stage) {
@@ -609,7 +597,7 @@ function TaskNode(fn) {
609597
this.promise = this._deferred.promise;
610598
this.inputs = [];
611599
this.outputs = [];
612-
};
600+
}
613601

614602
function FileNode(context, file) {
615603
this.id = id++;
@@ -640,8 +628,7 @@ function callfn(fn) {
640628
return fn;
641629
}
642630

643-
function ProxyFile() {
644-
};
631+
function ProxyFile() { }
645632

646633
ProxyFile.prototype._setFile = function(lazy) {
647634
this._lazy = lazy;
@@ -668,15 +655,15 @@ ProxyFile.prototype.patsubst = function(pattern, replacement) {
668655
return this.mapName(patsubst.bind(this, pattern, replacement));
669656
};
670657

671-
function ProxyFileList() { };
658+
function ProxyFileList() { }
672659

673660
ProxyFileList.prototype.names = function() {
674661
return this._lazies.getFilenames();
675662
};
676663

677664
function LazyFileList(context) {
678665
this._filenames = Promise.defer();
679-
};
666+
}
680667

681668
LazyFileList.prototype.getFilenames = function() {
682669
return this._filenames.promise;
@@ -689,7 +676,7 @@ LazyFileList.prototype._setFilenames = function(filenames) {
689676
function LazyFile(context, filename) {
690677
this._filename = filename;
691678
this._asBuffer = Promise.defer();
692-
};
679+
}
693680

694681
LazyFile.prototype._loadFile = function(filename) {
695682
if(filename)
@@ -772,7 +759,7 @@ function needsUpdate(inputs, outputs, context) {
772759
function allInputs(op) {
773760
if(op.secondaryInputs) return [op.primaryInput].concat(op.secondaryInputs);
774761
else return [op.primaryInput];
775-
};
762+
}
776763

777764
//(ibw) should switch to a real set data structure for maximum performance
778765
function union(a, b) {
@@ -836,7 +823,7 @@ fez.exec = function(command) {
836823
else resolve(true);
837824
});
838825
});
839-
};
826+
}
840827

841828
ex.value = command;
842829
return ex;
@@ -849,4 +836,4 @@ function patsubst(pattern, replacement, string) {
849836
out = replacement.replace("%", sub);
850837

851838
return out;
852-
};
839+
}

0 commit comments

Comments
 (0)