Skip to content

Commit c532742

Browse files
committed
refactor: fix lint warning on config
Signed-off-by: BoHong Li <[email protected]>
1 parent ee7eea6 commit c532742

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

lib/config/environment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
const {toBooleanConfig, toArrayConfig, toIntegerConfig} = require('./utils')
3+
const { toBooleanConfig, toArrayConfig, toIntegerConfig } = require('./utils')
44

55
module.exports = {
66
sourceURL: process.env.CMD_SOURCE_URL,

lib/config/hackmdEnvironment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
const {toBooleanConfig, toArrayConfig, toIntegerConfig} = require('./utils')
3+
const { toBooleanConfig, toArrayConfig, toIntegerConfig } = require('./utils')
44

55
module.exports = {
66
domain: process.env.HMD_DOMAIN,

lib/config/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
const crypto = require('crypto')
55
const fs = require('fs')
66
const path = require('path')
7-
const {merge} = require('lodash')
7+
const { merge } = require('lodash')
88
const deepFreeze = require('deep-freeze')
9-
const {Environment, Permission} = require('./enum')
9+
const { Environment, Permission } = require('./enum')
1010
const logger = require('../logger')
11-
const {getGitCommit, getGitHubURL} = require('./utils')
11+
const { getGitCommit, getGitHubURL } = require('./utils')
1212

1313
const appRootPath = path.resolve(__dirname, '../../')
1414
const env = process.env.NODE_ENV || Environment.development
@@ -17,7 +17,7 @@ const debugConfig = {
1717
}
1818

1919
// Get version string from package.json
20-
const {version, repository} = require(path.join(appRootPath, 'package.json'))
20+
const { version, repository } = require(path.join(appRootPath, 'package.json'))
2121

2222
const commitID = getGitCommit(appRootPath)
2323
const sourceURL = getGitHubURL(repository.url, commitID || version)
@@ -159,8 +159,8 @@ if (Object.keys(process.env).toString().indexOf('HMD_') !== -1) {
159159
if (config.sessionSecret === 'secret') {
160160
logger.warn('Session secret not set. Using random generated one. Please set `sessionSecret` in your config.js file. All users will be logged out.')
161161
config.sessionSecret = crypto.randomBytes(Math.ceil(config.sessionSecretLen / 2)) // generate crypto graphic random number
162-
.toString('hex') // convert to hexadecimal format
163-
.slice(0, config.sessionSecretLen) // return required number of characters
162+
.toString('hex') // convert to hexadecimal format
163+
.slice(0, config.sessionSecretLen) // return required number of characters
164164
}
165165

166166
// Validate upload upload providers

lib/config/oldEnvironment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
const {toBooleanConfig} = require('./utils')
3+
const { toBooleanConfig } = require('./utils')
44

55
module.exports = {
66
debug: toBooleanConfig(process.env.DEBUG),

0 commit comments

Comments
 (0)