Fix eslint errors

This commit is contained in:
NGPixel 2017-04-04 22:04:17 -04:00
parent 3b4402fb28
commit 8ba3b3552d
4 changed files with 7 additions and 10 deletions

View File

@ -428,12 +428,10 @@ module.exports = (port, spinner) => {
switch (error.code) { switch (error.code) {
case 'EACCES': case 'EACCES':
spinner.fail('Listening on port ' + port + ' requires elevated privileges!') spinner.fail('Listening on port ' + port + ' requires elevated privileges!')
process.exit(1) return process.exit(1)
break
case 'EADDRINUSE': case 'EADDRINUSE':
spinner.fail('Port ' + port + ' is already in use!') spinner.fail('Port ' + port + ' is already in use!')
process.exit(1) return process.exit(1)
break
default: default:
throw error throw error
} }

View File

@ -1,5 +1,7 @@
'use strict' 'use strict'
/* eslint-disable standard/no-callback-literal */
const _ = require('lodash') const _ = require('lodash')
module.exports = (socket) => { module.exports = (socket) => {

View File

@ -132,8 +132,7 @@ pm2.connectAsync().then(() => {
}) })
default: default:
console.info(colors.bold.cyan('> Open config.yml in your favorite editor. Then start Wiki.js using: node wiki start')) console.info(colors.bold.cyan('> Open config.yml in your favorite editor. Then start Wiki.js using: node wiki start'))
process.exit(0) return process.exit(0)
break
} }
}).then(() => { }).then(() => {
ora.succeed(colors.bold.green('Wiki.js has been configured and is now running!')) ora.succeed(colors.bold.green('Wiki.js has been configured and is now running!'))

View File

@ -198,12 +198,10 @@ server.on('error', (error) => {
switch (error.code) { switch (error.code) {
case 'EACCES': case 'EACCES':
console.error('Listening on port ' + appconfig.port + ' requires elevated privileges!') console.error('Listening on port ' + appconfig.port + ' requires elevated privileges!')
process.exit(1) return process.exit(1)
break
case 'EADDRINUSE': case 'EADDRINUSE':
console.error('Port ' + appconfig.port + ' is already in use!') console.error('Port ' + appconfig.port + ' is already in use!')
process.exit(1) return process.exit(1)
break
default: default:
throw error throw error
} }