From e0855bee7b8a726f4755bbb9789aafd20c1e78d1 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 11 May 2017 18:07:28 +0300 Subject: [PATCH] chore(cloudcmd) lint --- bin/cloudcmd.js | 9 ++++++--- test/server/modulas.js | 2 +- test/server/root.js | 4 ---- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/bin/cloudcmd.js b/bin/cloudcmd.js index a5f74d01..f8946a15 100755 --- a/bin/cloudcmd.js +++ b/bin/cloudcmd.js @@ -81,11 +81,14 @@ const args = require('minimist')(argv.slice(2), { } }); -if (args.version) { +if (args.version) version(); -} else if (args.help) { +else if (args.help) help(); -} else { +else + main(); + +function main() { if (args.repl) repl(); diff --git a/test/server/modulas.js b/test/server/modulas.js index 80a7396b..4f0eee3e 100644 --- a/test/server/modulas.js +++ b/test/server/modulas.js @@ -71,7 +71,7 @@ test('cloudcmd: modules: wrong route', (t) => { }); }); -test('cloudcmd: modules: no', (t) => { +test('cloudcmd: modules: no', (t) => { const fn = modulas(); const url = '/json/modules.json'; const send = sinon.stub(); diff --git a/test/server/root.js b/test/server/root.js index 2dab193f..5230b0ed 100644 --- a/test/server/root.js +++ b/test/server/root.js @@ -1,10 +1,8 @@ 'use strict'; -const os = require('os'); const path = require('path'); const test = require('tape'); -const readjson = require('readjson'); const diff = require('sinon-called-with-diff'); const sinon = diff(require('sinon')); @@ -13,8 +11,6 @@ const dir = path.join(__dirname, '..', '..', 'server'); const pathConfig = path.join(dir, 'config'); const pathRoot = `${dir}/root`; -const root = require(pathRoot); - const clean = (name) => { delete require.cache[require.resolve(name)]; };