     if fs.existsSync babelrcFile
       return true
     if fromDir isnt toDir
+      # stop infinite recursion https://github.com/gandm/language-babel/issues/66
+      if fromDir == path.dirname(fromDir) then return false
       return @isBabelrcInPath path.dirname(fromDir), toDir
     else return false
 

        merge  jsonContent, localConfig
        localConfig = jsonContent
    if fromDir isnt toDir
      return @getLocalConfig path.dirname(fromDir), toDir, localConfig
    else return localConfig


    config = @getConfig()
    pathTo = @getPaths sourceFile, config

    if config.allowLocalOverride
      localConfig = @getLocalConfig pathTo.sourceFileDir, pathTo.projectPath, {}
      # merge local configs with global. local wins
      merge config, localConfig
      # recalc paths
      pathTo = @getPaths sourceFile, config

    return if config.transpileOnSave isnt true

