diff options
author | Sheogorath | 2019-06-04 16:09:46 +0200 |
---|---|---|
committer | GitHub | 2019-06-04 16:09:46 +0200 |
commit | 6462968e84e8d92292dd23764a9e558d7800147d (patch) | |
tree | 03ab6b40402c79c766ffa05a0a09118c6987d540 /lib/config | |
parent | ae32a129303fd14b3b2bd2f5b7bb0b0c0c8a7f81 (diff) | |
parent | 4da68597f701376307fe8849ed57edd3a80833ed (diff) |
Merge pull request #97 from SISheogorath/fix/linting
Fix eslint warnings
Diffstat (limited to 'lib/config')
-rw-r--r-- | lib/config/environment.js | 2 | ||||
-rw-r--r-- | lib/config/hackmdEnvironment.js | 2 | ||||
-rw-r--r-- | lib/config/index.js | 12 | ||||
-rw-r--r-- | lib/config/oldEnvironment.js | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/lib/config/environment.js b/lib/config/environment.js index 0a709745..d2350e72 100644 --- a/lib/config/environment.js +++ b/lib/config/environment.js @@ -1,6 +1,6 @@ 'use strict' -const {toBooleanConfig, toArrayConfig, toIntegerConfig} = require('./utils') +const { toBooleanConfig, toArrayConfig, toIntegerConfig } = require('./utils') module.exports = { sourceURL: process.env.CMD_SOURCE_URL, diff --git a/lib/config/hackmdEnvironment.js b/lib/config/hackmdEnvironment.js index e5ffeb8a..dcfda0bc 100644 --- a/lib/config/hackmdEnvironment.js +++ b/lib/config/hackmdEnvironment.js @@ -1,6 +1,6 @@ 'use strict' -const {toBooleanConfig, toArrayConfig, toIntegerConfig} = require('./utils') +const { toBooleanConfig, toArrayConfig, toIntegerConfig } = require('./utils') module.exports = { domain: process.env.HMD_DOMAIN, 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 diff --git a/lib/config/oldEnvironment.js b/lib/config/oldEnvironment.js index a3b13cb9..06047553 100644 --- a/lib/config/oldEnvironment.js +++ b/lib/config/oldEnvironment.js @@ -1,6 +1,6 @@ 'use strict' -const {toBooleanConfig} = require('./utils') +const { toBooleanConfig } = require('./utils') module.exports = { debug: toBooleanConfig(process.env.DEBUG), |