From 8ba3b3552d17446a4954d67e1736580b78c6c459 Mon Sep 17 00:00:00 2001 From: NGPixel Date: Tue, 4 Apr 2017 22:04:17 -0400 Subject: [PATCH] Fix eslint errors --- configure.js | 6 ++---- controllers/ws.js | 2 ++ npm/install.js | 3 +-- server.js | 6 ++---- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/configure.js b/configure.js index 82888d12..19c5cdc0 100644 --- a/configure.js +++ b/configure.js @@ -428,12 +428,10 @@ module.exports = (port, spinner) => { switch (error.code) { case 'EACCES': spinner.fail('Listening on port ' + port + ' requires elevated privileges!') - process.exit(1) - break + return process.exit(1) case 'EADDRINUSE': spinner.fail('Port ' + port + ' is already in use!') - process.exit(1) - break + return process.exit(1) default: throw error } diff --git a/controllers/ws.js b/controllers/ws.js index efaae330..f66a3667 100644 --- a/controllers/ws.js +++ b/controllers/ws.js @@ -1,5 +1,7 @@ 'use strict' +/* eslint-disable standard/no-callback-literal */ + const _ = require('lodash') module.exports = (socket) => { diff --git a/npm/install.js b/npm/install.js index 693744dd..039f1374 100644 --- a/npm/install.js +++ b/npm/install.js @@ -132,8 +132,7 @@ pm2.connectAsync().then(() => { }) default: console.info(colors.bold.cyan('> Open config.yml in your favorite editor. Then start Wiki.js using: node wiki start')) - process.exit(0) - break + return process.exit(0) } }).then(() => { ora.succeed(colors.bold.green('Wiki.js has been configured and is now running!')) diff --git a/server.js b/server.js index ab7c64af..22c7f516 100644 --- a/server.js +++ b/server.js @@ -198,12 +198,10 @@ server.on('error', (error) => { switch (error.code) { case 'EACCES': console.error('Listening on port ' + appconfig.port + ' requires elevated privileges!') - process.exit(1) - break + return process.exit(1) case 'EADDRINUSE': console.error('Port ' + appconfig.port + ' is already in use!') - process.exit(1) - break + return process.exit(1) default: throw error }