code: function loadConfig(configPath) {
  	return new Promise((resolve, reject) => {
  		configPath = resolveConfigPath(configPath);
  		let config;
  		try {
  			config = loadLocalConfigUnmodified(configPath);
  			if (!config) {
  				config = loadLocalConfigWithJs(configPath);
  			}
  			if (!config) {
  				config = loadLocalConfigWithJson(configPath);
  			}
  			if (program.config && !config) {
  				return reject(new Error(`The config file "${configPath}" could not be loaded`));
  			}
  		} catch (error) {
  			return reject(
  				new Error(`There was a problem loading "${configPath}":\n${error.stack}`)
  			);
  		}
  
  		// Allow loaded configs to return a promise
  		Promise.resolve(config).then(config => {
  			resolve(defaultConfig(config || {}));
  		});
  	});
  }
docs: This function loads the JSON or JavaScript config file specified by the user. It checks for config files in the following order: - no extension (JSON) - js extension (JavaScript) - json extension (JSON)