diff --git a/.eslintrc b/.eslintrc index 490fd6e..adbc084 100644 --- a/.eslintrc +++ b/.eslintrc @@ -65,7 +65,7 @@ rules: no-floating-decimal: 2 no-implicit-coercion: 2 no-implied-eval: 2 - no-invalid-this: 1 + no-invalid-this: 2 no-iterator: 2 no-labels: 2 no-lone-blocks: 2 @@ -148,8 +148,8 @@ rules: max-nested-callbacks: [2,4] max-params: 0 max-statements: [2, 35] - new-cap: 0 - new-parens: 0 + new-cap: 2 + new-parens: 2 newline-after-var: 0 no-array-constructor: 2 no-bitwise: 2 @@ -177,9 +177,9 @@ rules: quotes: 0 require-jsdoc: 0 semi-spacing: 0 - semi: 0 + semi: 2 sort-vars: 0 - space-after-keywords: 0 + keyword-spacing: 2 space-before-blocks: 0 space-before-function-paren: 0 space-before-keywords: 0 diff --git a/.istanbul.yml b/.istanbul.yml index de6fa38..52b7dbe 100644 --- a/.istanbul.yml +++ b/.istanbul.yml @@ -6,8 +6,8 @@ instrumentation: default-excludes: true excludes: - 'node_modules/**/*' + - 'index.js' - 'resources/**/*' - - 'bootstrap/commands.js' - 'data/**/*' - 'test/**/*' embed-source: true diff --git a/Commands/makeCommand.js b/Commands/makeCommand.js index ae43417..b51c682 100644 --- a/Commands/makeCommand.js +++ b/Commands/makeCommand.js @@ -20,7 +20,7 @@ var createCommand = function createCommand(cmdName) { resolve(cmdName + ' created'); }) .catch(function writeErr(err) { - reject(err) + reject(err); }); }); }; diff --git a/lib/Config/database.js b/lib/Config/database.js index 77d2ab9..c0cea03 100644 --- a/lib/Config/database.js +++ b/lib/Config/database.js @@ -8,5 +8,5 @@ module.exports = function compileDatabaseConfig(db) { }; conf.redis = db.redis.default; return conf; -} +}; diff --git a/lib/Config/mail.js b/lib/Config/mail.js index 44f009a..54062fc 100644 --- a/lib/Config/mail.js +++ b/lib/Config/mail.js @@ -1,5 +1,4 @@ 'use strict'; -/* global appdir */ module.exports = function compileMailCongif(conf) { return { transporter: { @@ -10,8 +9,7 @@ module.exports = function compileMailCongif(conf) { ignoreTLS: true }, - from: conf.from.name + '<' + conf.from.address + '>', - root: appdir + from: conf.from.name + ' <' + conf.from.address + '>' }; -} +}; diff --git a/lib/shell/lib/Request.js b/lib/shell/lib/Request.js index af29574..89d618e 100644 --- a/lib/shell/lib/Request.js +++ b/lib/shell/lib/Request.js @@ -7,14 +7,14 @@ var exportRequest = (function exportRequest() { var Request = function Request(shell, command) { this.shell = shell; this.command = command; - } + }; var cleanAnswer = function cleanAnswer(answer) { if (answer.substr(-1, 1) === '\n') { answer = answer.substr(0, answer.length - 1); } return answer; - } + }; /* Ask one or more questions diff --git a/lib/shell/lib/Response.js b/lib/shell/lib/Response.js index d1d1665..75c15fa 100644 --- a/lib/shell/lib/Response.js +++ b/lib/shell/lib/Response.js @@ -7,7 +7,7 @@ var response = (function exportResponse(_super) { var Response = function Response(settings) { this.shell = settings.shell; Response.super_.call(this, settings); - } + }; util.inherits(Response, _super); Response.prototype.pad = pad; @@ -20,5 +20,5 @@ var response = (function exportResponse(_super) { })(styles); -module.exports = response +module.exports = response; diff --git a/lib/shell/lib/Styles.js b/lib/shell/lib/Styles.js index 77d8ba7..f174d83 100644 --- a/lib/shell/lib/Styles.js +++ b/lib/shell/lib/Styles.js @@ -50,11 +50,11 @@ var _fn = function _fn(color) { Styles.prototype[color] = function prototypeColor(text) { return this.color(color, text); }; - return Styles.prototype[color] + return Styles.prototype[color]; }; each(colors, function eachColors(code, color) { _fn(color); -}) +}); Styles.prototype.nocolor = function nocolor(text) { return this.color(null, text); diff --git a/lib/shell/lib/routes/shellOnly.js b/lib/shell/lib/routes/shellOnly.js index cc4b8f7..04c9701 100644 --- a/lib/shell/lib/routes/shellOnly.js +++ b/lib/shell/lib/routes/shellOnly.js @@ -9,7 +9,7 @@ Ensure the current process is running in shell mode. module.exports = function shellOnly(req, res, next) { if (!req.shell.isShell) { - res.red('Command may only be executed inside a running shell'); + res.red('Command may only be executed inside a running shell').ln(); res.prompt(); return; }