checkForConfigExtend = function (config, curConfPath) {
  var mergedConfig = config,
      subConfig = config.options['config-file'] || false,
      confPath,
      resolvedSubConfig;

  if (subConfig) {
    if (!pathIsAbsolute(subConfig)) {
      // Process.cwd() in most IDE's will be / so therefore we need to pass the current directory
      // of the config from which you are 'extending' or we resort to process.cwd() which on the CLI
      // will be correct
      confPath = curConfPath ? path.dirname(curConfPath) : process.cwd();
      subConfig = path.resolve(confPath, subConfig);
    }
    // Attempt to load the new found config file
    resolvedSubConfig = loadConfig(subConfig, curConfPath);
    // Check the new config file to see if it too is extending
    resolvedSubConfig = checkForConfigExtend(resolvedSubConfig, subConfig);
    // Merge our configs with the first encountered being the most important, down to the last config
    // being the least.
    mergedConfig = merge.recursive(resolvedSubConfig, config);
  }

  return mergedConfig;
}
Checks a config file to see if another config file is specified, if it is, the file is laoded
and merged with the current configuration object.

@param {Object} config - The current configuration
@param {String} curConfPath - The current path(incl filename) to the configuration object passed as 'config'
@returns {Object} The merged configuration object