From 136d895d155f28c2e75b3af206549acaa2a354ed Mon Sep 17 00:00:00 2001 From: Philip Molares Date: Mon, 15 Feb 2021 09:42:51 +0100 Subject: Linter: Fix all lint errors Signed-off-by: Philip Molares --- lib/config/index.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/config') 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 -- cgit v1.2.3