Fix JSHint errors

This commit is contained in:
Andrew Stewart 2014-06-16 13:09:13 -07:00
parent ca749fd03e
commit af8cfbe333
6 changed files with 8 additions and 14 deletions

View File

@ -58,13 +58,13 @@ var API = module.exports = function API(opts) {
for (var p in container) {
req.commandParams.push(container[p]);
};
}
return next();
});
// load route definitions
this.express.use('/', require('./api/routes'))
this.express.use('/', require('./api/routes'));
};
API.prototype.defaults = {
@ -90,7 +90,7 @@ API.prototype.createServer = function createServer() {
cert: fs.readFileSync(this.ssl.cert)
}, this.express);
} else {
Logger.warn("API using insecure connection. We recommend using an SSL certificate with Cylon.")
Logger.warn("API using insecure connection. We recommend using an SSL certificate with Cylon.");
this.server = this.express;
}
};

View File

@ -47,7 +47,7 @@ module.exports = Connection = function Connection(opts) {
this.adaptor = this.initAdaptor(opts);
Utils.proxyFunctionsToObject(this.adaptor.commands, this.adaptor, this.self);
}
};
Utils.subclass(Connection, EventEmitter);
@ -69,7 +69,6 @@ Connection.prototype.toJSON = function() {
//
// Returns the result of the supplied callback function
Connection.prototype.connect = function(callback) {
var msg = "Connecting to " + this.name;
var msg = "Connecting to '" + this.name + "'";
if (this.port != null) {

View File

@ -99,7 +99,7 @@ if (process.platform === "win32") {
readline.createInterface(io).on("SIGINT", function() {
process.emit("SIGINT");
});
};
}
process.on("SIGINT", function() {
Cylon.halt(function() {

View File

@ -12,11 +12,6 @@ var Basestar = require('./basestar'),
Logger = require('./logger'),
Utils = require('./utils');
// The Driver class is a base class for Driver classes in external Cylon
// modules to use. It offers basic functions for starting/halting that
// descendant classes can use.
var Driver;
// Public: Creates a new Driver
//
// opts - hash of acceptable params
@ -24,7 +19,7 @@ var Driver;
// device - Device the driver will use to proxy commands/events
//
// Returns a new Driver
module.exports = Driver = function Driver(opts) {
var Driver = module.exports = function Driver(opts) {
if (opts == null) {
opts = {};
}

View File

@ -28,7 +28,7 @@ var DigitalPin = module.exports = function DigitalPin(opts) {
this.status = 'low';
this.ready = false;
this.mode = opts.mode;
}
};
Utils.subclass(DigitalPin, EventEmitter);

View File

@ -1,6 +1,6 @@
// The NullLogger is designed for cases where you want absolutely nothing to
// print to anywhere. Every proxied method from the Logger returns a noop.
var NullLogger = module.exports = function NullLogger() {}
var NullLogger = module.exports = function NullLogger() {};
NullLogger.prototype.toString = function() {
return "NullLogger";