Try read config file from `/config` directory. And the file name is ..., .rabbitrc?  TODO upward find the package.json
764491
function readConfig() {
  const patten = `${process.cwd()}/config/*.json`
  return glob.sync(patten).reduce((acc, curr) => {
    var ctx = !env ? require(curr) : require(curr)[env]
    return Object.assign({}, acc, ctx)
  }, {})
}
365961
function getPackageRoot (dir) {
    let lastDir = null;
    while (lastDir !== dir && !fs.existsSync(path.resolve(dir, "./package.json"))) {
        lastDir = dir;
        dir = path.dirname(dir);
    }
    return (lastDir === dir ? null : dir);
}
302748
function findPackage(config, match) {
  var map = getPackageMap(config.relativeTo, config.packages);

  return _.reduce(map, function (prev, pkg) {

    // Resolve using last priority. Priority:
    // 1. package is a file
    // 2. package granularity (done by file depth)
    if (pkg.regexp.test(match) && (!prev || (pkg.dir && prev.dir && pkg.depth >= pkg.depth) || pkg.file)) {
      return pkg;
    } else {
      return prev;
    }

  }, null);
}
907441
def read_config(config_path=CONFIG_PATH):
    
    if not os.path.isfile(config_path):
        raise IOError("No config file found at %s" % config_path)
    config_parser = configparser.ConfigParser()
    config_parser.read(config_path)
    config = _config_parser_to_defaultdict(config_parser)
    return config
1203558
def fetch_config(filename):
    

    #  This trick gets the directory of *this* file Configuration.py thus
    # allowing to find the schema files relative to this file.
    dir_name = get_source_dir()

    # Append json
    filename = os.path.join('json', filename)

    fileobj = open(os.path.join(dir_name, filename), 'r')
    my_dict = json.loads(fileobj.read())
    return my_dict
1137598
async function read(packageName) {
  const packagePath = path.join(cwd, packageName, 'package.json');

  return JSON.parse(await fs.readFile(packagePath));
}
1358368
function getProjectName(dir) {
    return fs.readFileAsync(path.join(dir, 'package.json'))
        .then(JSON.parse & _.name)
        .catchThrow(new Error('Failed to parse package.json from the project'));
}
1051951
def _read(name):
    """"""
    logging.debug("Reading config-file: %s" % name)
    try:
        with open(name, "r") as config_file:
            prm_dict = yaml.load(config_file)
    except yaml.YAMLError:
        raise yaml.YAMLErrorr
    else:
        return prm_dict
731757
def get_conf_file(self):
        
        for conf_file in [self.collection_rules_file, self.fallback_file]:
            logger.debug("trying to read conf from: " + conf_file)
            conf = self.try_disk(conf_file, self.gpg)

            if not conf:
                continue

            version = conf.get('version', None)
            if version is None:
                raise ValueError("ERROR: Could not find version in json")

            conf['file'] = conf_file
            logger.debug("Success reading config")
            logger.debug(json.dumps(conf))
            return conf

        raise ValueError("ERROR: Unable to download conf or read it from disk!")
708239
function findComponentConfigFile(config, component) {
  var componentConfigFile;

  if (config.get('include-self') && component === config.get('bower.json').name) {
    return config.get('bower.json');
  }

  ['bower.json', '.bower.json', 'component.json', 'package.json'].
    forEach(function (configFile) {
      configFile = $.path.join(config.get('bower-directory'), component, configFile);

      if (!$._.isObject(componentConfigFile) && $.fs.existsSync(configFile)) {
        componentConfigFile = JSON.parse($.fs.readFileSync(configFile));
      }
    });

  return componentConfigFile;
}
301972
def _read_config(self):
        """"""
        config = configparser.ConfigParser()
        config.read(self.path)
        if config.has_section('distutils'):
            server_names = config.get('distutils', 'index-servers')
            servers = [name.strip() for name in server_names.split('\n')]
            servers = [server for server in servers if server]

            for server in servers:
                repo_config = RepositoryConfig(server)
                repo_config.fill(config, server)
                self.repositories.append(repo_config)

        repo_config = RepositoryConfig('default')
        repo_config.fill(config, 'server-login')
679098
function getConfig() {
  // Load the myrmex main configuration file
  let config = {};
  try {
    // try to load a myrmex.json or myrmex.js file
    config = require(path.join(process.cwd(), 'myrmex'));
  } catch (e) {
    // Silently ignore if there is no configuration file
    return config;
  }

  config.config = config.config || {};

  // Load sub-configuration files
  config.configPath = config.configPath || './config';
  const configPath = path.join(process.cwd(), config.configPath);
  let files = [];
  try {
    files = fs.readdirSync(configPath);
  } catch (e) {
    // Silently ignore if there is no configuration directory
  }
  files.forEach(file => {
    const parse = path.parse(file);
    // We load all .js and .json files in the configuration directory
    if (['.js', '.json'].indexOf(parse.ext) !== -1) {
      config.config[parse.name] = _.merge(config.config[parse.name] || {}, require(path.join(configPath, file)));
    }
  });

  // Add configuration passed by environment variables
  Object.keys(process.env).forEach(key => {
    const prefix = 'MYRMEX_';
    if (key.substring(0, prefix.length) === prefix) {
      // We transform
      //     MYRMEX_myConfig_levels = value
      // into
      //     { config: { myConfig: { levels: value } } }
      function addParts(config, parts, value) {
        const part = parts.shift();
        if (parts.length === 0) {
          // Convert string values "true" and "false" to booleans
          if (value === 'false') { value = false; }
          if (value === 'true') { value = true; }
          config[part] = value;
        } else {
          if (config[part] === undefined) {
            config[part] = {};
          }
          addParts(config[part], parts, value);
        }
      }
      addParts(config.config, key.substring(prefix.length).split('_'), process.env[key]);
    }
  });

  return config;
}
739154
def get_config(self, configfile):
        
        with open(configfile) as config_file:
            config = json.load(config_file)
        return config
1127675
function readConfigFromFile(filePath) {
  var config = {};

  if (isFilePath(filePath)) {
    try {
      config = yaml.safeLoad(stripComments(fs.readFileSync(filePath, 'utf8'))) || {};
    } catch (e) {
      e.message = 'Cannot read config file: ' + filePath + '\nError: ' + e.message;
      throw e;
    }

    if (path.basename(filePath) === PACKAGE_CONFIG_FILENAME) {
      config = config[PACKAGE_CONFIG_FIELD_NAME] || {};
    }

  } else {

        // it's a package

    if (filePath.charAt(0) === '@') {
            // it's a scoped package

            // package name is 'nplint-config', or just a username
      var scopedPackageShortcutRegex = /^(@[^\/]+)(?:\/(?:eslint-config)?)?$/;
      if (scopedPackageShortcutRegex.test(filePath)) {
        filePath = filePath.replace(scopedPackageShortcutRegex, '$1/nplint-config');
      } else if (filePath.split('/')[1].indexOf('eslint-config-') !== 0) {
                // for scoped packages, insert the eslint-config after the first /
        filePath = filePath.replace(/^@([^\/]+)\/(.*)$/, '@$1/nplint-config-$2');
      }
    } else if (filePath.indexOf('nplint-config-') !== 0) {
      filePath = 'nplint-config-' + filePath;
    }

    config = util.mergeConfigs(config, require(filePath));
  }
  return config;
}
626226
function configurePackageDir(pkgs, currentPackages, dir) {
        var i, location, pkgObj;

        for (i = 0; (pkgObj = currentPackages[i]); i++) {
            pkgObj = typeof pkgObj === "string" ? { name: pkgObj } : pkgObj;
            location = pkgObj.location;

            //Add dir to the path, but avoid paths that start with a slash
            //or have a colon (indicates a protocol)
            if (dir && (!location || (location.indexOf("/") !== 0 && location.indexOf(":") === -1))) {
                location = dir + "/" + (location || pkgObj.name);
            }

            //Create a brand new object on pkgs, since currentPackages can
            //be passed in again, and config.pkgs is the internal transformed
            //state for all package configs.
            pkgs[pkgObj.name] = {
                name: pkgObj.name,
                location: location || pkgObj.name,
                //Remove leading dot in main, so main paths are normalized,
                //and remove any trailing .js, since different package
                //envs have different conventions: some use a module name,
                //some use a file name.
                main: (pkgObj.main || "main")
                      .replace(currDirRegExp, '')
                      .replace(jsSuffixRegExp, '')
            };
        }
    }
1256443
function pkg(val) {
    var filename = path_1.resolve(exports.cwd, 'package.json');
    if (!val)
        return _pkg || (_pkg = fs_extra_1.readJSONSync(filename));
    fs_extra_1.writeJSONSync(filename, val, { spaces: 2 });
}
1299854
def _read_config(config_location):
    
    global LOGGING_CONFIG
    with open(config_location, "r") as config_loc:
        cfg_file = json.load(config_loc)
        if "logging" in cfg_file:
            log_dict = cfg_file.get("logging")
            with open(os.path.abspath(os.path.join(__file__,
                                                   os.path.pardir,
                                                   'logging_schema.json'))) as schema_file:
                logging_schema = json.load(schema_file)
                jsonschema.validate(log_dict, logging_schema)
                merged = jsonmerge.merge(LOGGING_CONFIG, log_dict)
                LOGGING_CONFIG = merged