chore: eslint prefer-template

This commit is contained in:
Peter Jaszkowiak
2021-02-03 23:59:08 -07:00
committed by Julian Lam
parent 4ee0f1459d
commit 707b55b6a5
357 changed files with 2425 additions and 2427 deletions

View File

@@ -41,7 +41,7 @@ nconf.set('relative_path', relativePath);
nconf.set('upload_path', path.join(nconf.get('base_dir'), nconf.get('upload_path')));
nconf.set('upload_url', '/assets/uploads');
nconf.set('url_parsed', urlObject);
nconf.set('base_url', urlObject.protocol + '//' + urlObject.host);
nconf.set('base_url', `${urlObject.protocol}//${urlObject.host}`);
nconf.set('secure', urlObject.protocol === 'https:');
nconf.set('use_port', !!urlObject.port);
nconf.set('port', urlObject.port || nconf.get('port') || (nconf.get('PORT_ENV_VAR') ? nconf.get(nconf.get('PORT_ENV_VAR')) : false) || 4567);
@@ -113,7 +113,7 @@ if (testDbConfig.database === productionDbConfig.database &&
nconf.set(dbType, testDbConfig);
winston.info('database config %s', dbType, testDbConfig);
winston.info('environment ' + global.env);
winston.info(`environment ${global.env}`);
const db = require('../../src/database');
@@ -125,7 +125,6 @@ before(async function () {
// Parse out the relative_url and other goodies from the configured URL
const urlObject = url.parse(nconf.get('url'));
nconf.set('core_templates_path', path.join(__dirname, '../../src/views'));
nconf.set('base_templates_path', path.join(nconf.get('themes_path'), 'nodebb-theme-persona/templates'));
nconf.set('theme_config', path.join(nconf.get('themes_path'), 'nodebb-theme-persona', 'theme.json'));