diff options
author | Philip Molares | 2021-02-15 09:42:51 +0100 |
---|---|---|
committer | Philip Molares | 2021-02-15 12:15:14 +0100 |
commit | 136d895d155f28c2e75b3af206549acaa2a354ed (patch) | |
tree | ad80595f5dd94a7ac63bc1481943ae7b356ddb17 /lib/config | |
parent | b0a45bdf9c531d93a2462c09d58b2e9e703a0a66 (diff) |
Linter: Fix all lint errors
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Diffstat (limited to '')
-rw-r--r-- | lib/config/index.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/config/index.js b/lib/config/index.js index 1657ba7a..17c13f5f 100644 --- a/lib/config/index.js +++ b/lib/config/index.js @@ -58,14 +58,14 @@ if (!['strict', 'lax', 'none'].includes(config.cookiePolicy)) { // load LDAP CA if (config.ldap.tlsca) { - let ca = config.ldap.tlsca.split(',') - let caContent = [] - for (let i of ca) { + const ca = config.ldap.tlsca.split(',') + const caContent = [] + for (const i of ca) { if (fs.existsSync(i)) { caContent.push(fs.readFileSync(i, 'utf8')) } } - let tlsOptions = { + const tlsOptions = { ca: caContent } config.ldap.tlsOptions = config.ldap.tlsOptions ? Object.assign(config.ldap.tlsOptions, tlsOptions) : tlsOptions @@ -90,9 +90,9 @@ config.isStandardHTTPPort = (function isStandardHTTPPort () { // cache serverURL config.serverURL = (function getserverurl () { - var url = '' + let url = '' if (config.domain) { - var protocol = config.protocolUseSSL ? 'https://' : 'http://' + const protocol = config.protocolUseSSL ? 'https://' : 'http://' url = protocol + config.domain if (config.urlAddPort) { if (!config.isStandardHTTPPort || !config.isStandardHTTPsPort) { @@ -138,10 +138,10 @@ config.isGitlabSnippetsEnable = (!config.gitlab.scope || config.gitlab.scope === config.updateI18nFiles = (env === Environment.development) // merge legacy values -let keys = Object.keys(config) +const keys = Object.keys(config) const uppercase = /[A-Z]/ for (let i = keys.length; i--;) { - let lowercaseKey = keys[i].toLowerCase() + const lowercaseKey = keys[i].toLowerCase() // if the config contains uppercase letters // and a lowercase version of this setting exists // and the config with uppercase is not set |