Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Lint refactor

  • Loading branch information...
commit 9582519345c5d1df77d61aff51be8c1c8f14ba57 1 parent f09df3b
@mendezcode mendezcode authored
View
1  jshint.json
@@ -20,6 +20,7 @@
"asi": true,
"eqnull": true,
"es5": true,
+ "strict": false,
"funcscope": true,
"lastsemic": false,
"multistr": true,
View
3  lib/driver.js
@@ -144,7 +144,7 @@ Driver.prototype.queryCached = function() {
var multi = new Multi(storage);
- for (i=0; i < invalidate.length; i++) {
+ for (var i=0; i < invalidate.length; i++) {
invalidateID = cachePrefix + invalidate[i];
invalidate[i] = invalidateID;
multi.delete(invalidateID);
@@ -487,6 +487,7 @@ Driver.prototype.__modelMethods = {
*/
function provideAppMethods(model, methodsProto) {
+ /*jshint immed:false */
var key, method,
app = model.app,
cname = inflect.camelize(model.context),
View
16 middleware/logger/logger.js
@@ -51,15 +51,13 @@ function Logger(config, middleware) {
}
}, config);
- switch (typeof config.accessLog) {
- case 'boolean':
- if (config.accessLog) config.accessLog = {console: true};
- break;
- default:
- if (config.accessLog && !(config.accessLog instanceof Object)) {
- config.accessLog = {console: true};
- }
- break;
+
+ if (typeof config.accessLog == 'boolean') {
+ if (config.accessLog) config.accessLog = {console: true};
+ } else {
+ if (config.accessLog && !(config.accessLog instanceof Object)) {
+ config.accessLog = {console: true};
+ }
}
// Enable access log
View
4 middleware/repl.js
@@ -66,11 +66,11 @@ function createReplScript() {
src += '\n';
fs.writeFileSync(outFile, src, 'utf8');
- fs.chmodSync(outFile, 0755);
+ fs.chmodSync(outFile, parseInt('0755')); // pass jshint
}
function getActiveConnections() {
- return util.format('(%d active connection%s)', connections, (connections == 0 || connections > 1) ? 's' : '');
+ return util.format('(%d active connection%s)', connections, (connections === 0 || connections > 1) ? 's' : '');
}
function startServer(arg) {
Please sign in to comment.
Something went wrong with that request. Please try again.