function findConfig(file) {
  var dir  = path.dirname(path.resolve(file));
  var envs = getHomeDir();
  var proj = findFile(".jshintrc", dir);
  var home;

  if (proj)
    return proj;

  else if (envs) {
    home = path.normalize(path.join(envs, ".jshintrc"));

    if (fsUtils.exists(home))
      return home;
  }

  return null;
}
Tries to find a configuration file in either project directory
or in the home directory. Configuration files are named
'.jshintrc'.

@param {string} file path to the file to be linted
@returns {string} a path to the config file