From c41e59debc0c186154ea9b58cb0e28a83d02f681 Mon Sep 17 00:00:00 2001 From: Bentley Date: Tue, 25 Jul 2017 15:42:52 -0700 Subject: [PATCH] Pick Lint --- lib/commands/check.js | 11 +++++------ lib/formatters/quiet.js | 2 -- lib/index.js | 1 + 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/commands/check.js b/lib/commands/check.js index dcea110..9d3872a 100644 --- a/lib/commands/check.js +++ b/lib/commands/check.js @@ -1,7 +1,6 @@ 'use strict'; var usage = require('../../lib/utils/usage.js')('check.txt'); var Check = require('../check.js'); -var Formatters = require('../formatters'); var Path = require('path'); var getFormatter = require('../../lib/index').getFormatter; @@ -54,11 +53,11 @@ module.exports = { boolean: true, default: false }, - { - name: 'quiet', - boolean: true, - default: false - } + { + name: 'quiet', + boolean: true, + default: false + } ], command: onCommand }; diff --git a/lib/formatters/quiet.js b/lib/formatters/quiet.js index c18554f..908d532 100644 --- a/lib/formatters/quiet.js +++ b/lib/formatters/quiet.js @@ -1,8 +1,6 @@ 'use strict'; var Chalk = require('chalk'); -var Table = require('cli-table'); -var Cvss = require('cvss'); module.exports = function (err, data, pkgPath) { diff --git a/lib/index.js b/lib/index.js index 7b2f5b8..009b8e0 100644 --- a/lib/index.js +++ b/lib/index.js @@ -3,6 +3,7 @@ var Formatters = require('./formatters'); var getFormatter = function (name) { + if (Object.keys(Formatters).indexOf(name) !== -1) { return Formatters[name]; }