Linted all config files.
This commit is contained in:
@@ -25,11 +25,11 @@ class Config {
|
||||
throw new Error(`Filed "${section} => ${option}" does not exist.`);
|
||||
}
|
||||
|
||||
const field = new Field(this.fields[section][option])
|
||||
const field = new Field(this.fields[section][option]);
|
||||
|
||||
if (field.value === '') {
|
||||
const envField = process.env[[section.toUpperCase(), option.toUpperCase()].join('_')]
|
||||
if (envField !== undefined && envField.length !== 0) { return envField }
|
||||
const envField = process.env[[section.toUpperCase(), option.toUpperCase()].join('_')];
|
||||
if (envField !== undefined && envField.length !== 0) { return envField; }
|
||||
}
|
||||
|
||||
if (field.value === undefined) {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
class EnvironmentVariables {
|
||||
|
||||
constructor(variables) {
|
||||
this.variables = variables || process.env;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ const Filters = require('./filters.js');
|
||||
const EnvironmentVariables = require('./environmentVariables.js');
|
||||
|
||||
class Field {
|
||||
|
||||
constructor(rawValue, environmentVariables) {
|
||||
this.rawValue = rawValue;
|
||||
this.filters = new Filters(rawValue);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
class Filters {
|
||||
|
||||
constructor(value) {
|
||||
this.value = value;
|
||||
this.delimiter = '|';
|
||||
|
||||
Reference in New Issue
Block a user