summaryrefslogtreecommitdiff
path: root/lib/config/index.js
diff options
context:
space:
mode:
authorSheogorath2019-05-31 00:27:56 +0200
committerSheogorath2019-05-31 00:30:29 +0200
commit4da68597f701376307fe8849ed57edd3a80833ed (patch)
treefb50db25c63b3b2cb70426ba3eab42007be60134 /lib/config/index.js
parent3eca0a74ae3d87a42acb7c7b8e39e2c389e3c96c (diff)
Fix eslint warnings
Since we are about to release it's time to finally fix our linting. This patch basically runs eslint --fix and does some further manual fixes. Also it sets up eslint to fail on every warning on order to make warnings visable in the CI process. There should no functional change be introduced. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
Diffstat (limited to '')
-rw-r--r--lib/config/index.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/config/index.js b/lib/config/index.js
index e102dce9..b6001aa0 100644
--- a/lib/config/index.js
+++ b/lib/config/index.js
@@ -4,11 +4,11 @@
const crypto = require('crypto')
const fs = require('fs')
const path = require('path')
-const {merge} = require('lodash')
+const { merge } = require('lodash')
const deepFreeze = require('deep-freeze')
-const {Environment, Permission} = require('./enum')
+const { Environment, Permission } = require('./enum')
const logger = require('../logger')
-const {getGitCommit, getGitHubURL} = require('./utils')
+const { getGitCommit, getGitHubURL } = require('./utils')
const appRootPath = path.resolve(__dirname, '../../')
const env = process.env.NODE_ENV || Environment.development
@@ -17,7 +17,7 @@ const debugConfig = {
}
// Get version string from package.json
-const {version, repository} = require(path.join(appRootPath, 'package.json'))
+const { version, repository } = require(path.join(appRootPath, 'package.json'))
const commitID = getGitCommit(appRootPath)
const sourceURL = getGitHubURL(repository.url, commitID || version)
@@ -159,8 +159,8 @@ if (Object.keys(process.env).toString().indexOf('HMD_') !== -1) {
if (config.sessionSecret === 'secret') {
logger.warn('Session secret not set. Using random generated one. Please set `sessionSecret` in your config.js file. All users will be logged out.')
config.sessionSecret = crypto.randomBytes(Math.ceil(config.sessionSecretLen / 2)) // generate crypto graphic random number
- .toString('hex') // convert to hexadecimal format
- .slice(0, config.sessionSecretLen) // return required number of characters
+ .toString('hex') // convert to hexadecimal format
+ .slice(0, config.sessionSecretLen) // return required number of characters
}
// Validate upload upload providers