Skip to content

Commit 407b96e

Browse files
committed
[cs] fixed some issues and do some cleanup
1 parent b2dc3cb commit 407b96e

12 files changed

+214
-219
lines changed

.jscsrc

Whitespace-only changes.

.jshintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
node_modules
1+
node_modules
2+
lib/inflection.js

.jshintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
"futurehostile": true,
1010
"nonew": true,
1111
"unused": true,
12+
"shadow": true,
1213
"loopfunc": true
1314
}

api.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var Migration = require('./lib/migration.js');
99
var Seeder = require('./lib/seeder.js');
1010
var Migrator = require('./lib/migrator.js');
1111
var log = require('./lib/log');
12-
var pkginfo = require('pkginfo')(module, 'version');
12+
var pkginfo = require('pkginfo')(module, 'version'); // jshint ignore:line
1313
var dotenv = require('dotenv');
1414

1515

@@ -65,7 +65,7 @@ function dbmigrate(isModule, options, callback) {
6565
global.dbm = dbm; //deprecated
6666
this.internals.migrationOptions = {
6767
dbmigrate: this.internals.dbm,
68-
ignoreOnInit: this.internals.argv.ignore-on-init
68+
ignoreOnInit: this.internals.argv['ignore-on-init']
6969
};
7070
this.internals.seederOptions = {
7171
dbmigrate: this.internals.dbm

connect.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ var internals = {};
88

99
exports.connect = function(config, passedClass, callback) {
1010
var internals = {};
11-
var _config = config;
1211
if( config.config ) {
1312
internals = config.internals;
1413
config = config.config;

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var pkginfo = require('pkginfo')(module, 'version');
1+
var pkginfo = require('pkginfo')(module, 'version'); // jshint ignore:line
22

33
exports.dataType = require('./lib/data_type');
44

lib/log.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ exports.setEscape = function( escapeChar ) {
4242
};
4343

4444
exports.silence = function (isSilent) {
45-
return this.isSilent = isSilent;
45+
return ( this.isSilent = isSilent );
4646
};
4747
exports.info = function () {
4848
if ((!this.isSilent || global.verbose) &&
@@ -54,14 +54,14 @@ exports.info = function () {
5454
exports.warn = function () {
5555
if ((!this.isSilent || global.verbose) &&
5656
logLevel & level.warn) {
57-
var args = Array.prototype.unshift.call(arguments, '[WARN]');
57+
Array.prototype.unshift.call(arguments, '[WARN]');
5858
console.warn.apply(console, arguments);
5959
}
6060
};
6161
exports.error = function () {
6262
if ((!this.isSilent || global.verbose) &&
6363
logLevel & level.error) {
64-
var args = Array.prototype.unshift.call(arguments, '[ERROR]');
64+
Array.prototype.unshift.call(arguments, '[ERROR]');
6565
//console.trace( 'Trace from error log' );
6666
console.error.apply(console, arguments);
6767
}

0 commit comments

Comments
 (0)