eslint is king

This commit is contained in:
Iuri Matias 2018-03-31 21:15:53 -04:00
parent 02e407f90b
commit d3b0787895
1 changed files with 8 additions and 5 deletions

View File

@ -65,13 +65,16 @@ Config.prototype.reloadConfig = function() {
Config.prototype._mergeConfig = function(configFilePath, defaultConfig, env) {
if (!configFilePath) {
let configToReturn = defaultConfig['default'] || {}
let configToReturn = defaultConfig['default'] || {};
configToReturn.enabled = false;
return configToReturn;
}
if (!fs.existsSync(configFilePath)) {
this.logger.warn("no config file found at " + configFilePath + ". using default config");
// TODO: remove this if
if (this.logger) {
this.logger.warn("no config file found at " + configFilePath + ". using default config");
}
return defaultConfig['default'] || {};
}
@ -86,10 +89,10 @@ Config.prototype._mergeConfig = function(configFilePath, defaultConfig, env) {
};
Config.prototype._getFileOrOject = function(object, filePath, property) {
if (typeof(this.configDir) === 'object') {
if (typeof (this.configDir) === 'object') {
return this.configDir[property];
}
return this.configDir + filepath;
return this.configDir + filePath;
};
Config.prototype.loadBlockchainConfigFile = function() {
@ -106,7 +109,7 @@ Config.prototype.loadContractsConfigFile = function() {
var defaultVersions = {
"web3.js": "1.0.0-beta",
"solc": "0.4.17"
}
};
var versions = utils.recursiveMerge(defaultVersions, this.embarkConfig.versions || {});
var configObject = {