style(eslint): match operator-linebreak preferences

This commit is contained in:
Peter Jaszkowiak
2018-11-28 20:29:43 -07:00
committed by Julian Lam
parent 89c025d102
commit ba619c7ec8
40 changed files with 241 additions and 238 deletions

View File

@@ -45,47 +45,47 @@ var productionDbConfig = nconf.get(dbType);
if (!testDbConfig) {
const errorText = 'test_database is not defined';
winston.info(
'\n===========================================================\n'
+ 'Please, add parameters for test database in config.json\n'
+ 'For example (redis):\n'
+ '"test_database": {\n'
+ ' "host": "127.0.0.1",\n'
+ ' "port": "6379",\n'
+ ' "password": "",\n'
+ ' "database": "1"\n'
+ '}\n'
+ ' or (mongo):\n'
+ '"test_database": {\n'
+ ' "host": "127.0.0.1",\n'
+ ' "port": "27017",\n'
+ ' "password": "",\n'
+ ' "database": "1"\n'
+ '}\n'
+ ' or (mongo) in a replicaset\n'
+ '"test_database": {\n'
+ ' "host": "127.0.0.1,127.0.0.1,127.0.0.1",\n'
+ ' "port": "27017,27018,27019",\n'
+ ' "username": "",\n'
+ ' "password": "",\n'
+ ' "database": "nodebb_test"\n'
+ '}\n'
+ ' or (postgres):\n'
+ '"test_database": {\n'
+ ' "host": "127.0.0.1",\n'
+ ' "port": "5432",\n'
+ ' "username": "postgres",\n'
+ ' "password": "",\n'
+ ' "database": "nodebb_test"\n'
+ '}\n'
+ '==========================================================='
'\n===========================================================\n' +
'Please, add parameters for test database in config.json\n' +
'For example (redis):\n' +
'"test_database": {\n' +
' "host": "127.0.0.1",\n' +
' "port": "6379",\n' +
' "password": "",\n' +
' "database": "1"\n' +
'}\n' +
' or (mongo):\n' +
'"test_database": {\n' +
' "host": "127.0.0.1",\n' +
' "port": "27017",\n' +
' "password": "",\n' +
' "database": "1"\n' +
'}\n' +
' or (mongo) in a replicaset\n' +
'"test_database": {\n' +
' "host": "127.0.0.1,127.0.0.1,127.0.0.1",\n' +
' "port": "27017,27018,27019",\n' +
' "username": "",\n' +
' "password": "",\n' +
' "database": "nodebb_test"\n' +
'}\n' +
' or (postgres):\n' +
'"test_database": {\n' +
' "host": "127.0.0.1",\n' +
' "port": "5432",\n' +
' "username": "postgres",\n' +
' "password": "",\n' +
' "database": "nodebb_test"\n' +
'}\n' +
'==========================================================='
);
winston.error(errorText);
throw new Error(errorText);
}
if (testDbConfig.database === productionDbConfig.database
&& testDbConfig.host === productionDbConfig.host
&& testDbConfig.port === productionDbConfig.port) {
if (testDbConfig.database === productionDbConfig.database &&
testDbConfig.host === productionDbConfig.host &&
testDbConfig.port === productionDbConfig.port) {
const errorText = 'test_database has the same config as production db';
winston.error(errorText);
throw new Error(errorText);