code: function loadConfigFile(configInfo) {
      const { filePath } = configInfo;
      let config;
  
      switch (path.extname(filePath)) {
          case ".js":
              config = loadJSConfigFile(filePath);
              if (configInfo.configName) {
                  config = config.configs[configInfo.configName];
                  if (!config) {
                      throw configMissingError(configInfo.configFullName);
                  }
              }
              break;
  
          case ".json":
              if (path.basename(filePath) === "package.json") {
                  config = loadPackageJSONConfigFile(filePath);
                  if (config === null) {
                      return null;
                  }
              } else {
                  config = loadJSONConfigFile(filePath);
              }
              break;
  
          case ".yaml":
          case ".yml":
              config = loadYAMLConfigFile(filePath);
              break;
  
          default:
              config = loadLegacyConfigFile(filePath);
      }
  
      return ConfigOps.merge(ConfigOps.createEmptyConfig(), config);
  }
docs: Loads a configuration file regardless of the source. Inspects the file path
  to determine the correctly way to load the config file.
  @param {Object} configInfo The path to the configuration.
  @returns {Object} The configuration information.
  @private