 @param {string} name filename to search for (e.g. .jshintrc)
 @param {string} dir directory to start search from (default:
 current working directory)
+@param {boolean} upwards should recurse upwards on failure? (default: true)
 
 @returns {string} normalized filename
 ###
-findFile = (name, dir) ->
+findFile = (name, dir, upwards=true) ->
   path ?= require("path")
   dir = dir or process.cwd()
   filename = path.normalize(path.join(dir, name))

    indent_char: (if softTabs then " " else "\t")
    indent_with_tabs: not softTabs
  configOptions = getConfigOptionsFromSettings(languages)
  editedFilePath = editor.getPath()
  projectOptions = getConfig(editedFilePath)
  homeOptions = getConfig(getUserHome())
  if not forceEntireFile and isSelection
    text = editor.getSelectedText()
  else
    text = editor.getText()
  oldText = text
  allOptions = [
    editorOptions
    configOptions
    homeOptions
    projectOptions
  ]
  grammarName = editor.getGrammar().name
  # Finally, beautify!
  try

    @loadingView.hide()
    return
  # console.log 'Beautify time!'

  # Get current editor
  editor = atom.workspace.getActiveEditor()
  # Get current Atom editor configuration
  isSelection = !!editor.getSelectedText()
  softTabs = editor.softTabs
  tabLength = editor.getTabLength()
