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