 
       for f in fileset.src
         continue if not esExtensions[path.extname(f)]
-        fname = path.basename(f, path.extname(f))
+        lookupPath = "#{path.dirname(f)}/#{path.basename(f, path.extname(f))}"
 
         content = fs.readFileSync(f, encoding:'utf8')
         if /module.exports\s?=\s?.+/gmi.test(content)

          while i < result.length
            requirePath = result[i]
            i += 1
            baseRequirePath = path.basename(requirePath)

            plainRequireRe = new RegExp("require[ (]['\"].*#{baseRequirePath}['\"]\\)?$","gm")
            defaultRequireRe = new RegExp("require\\(['\"].*#{baseRequirePath}['\"]\\)\\.default","gm")

            if esExport[baseRequirePath]
              if not plainRequireRe.test(content)
                errors.push("#{f}: ES6 no `default` exported #{requirePath}")

            if esNoExport[baseRequirePath]
              errors.push("#{f}: nothing exported from #{requirePath}")

            if esExportDefault[baseRequirePath]
              if not defaultRequireRe.test(content)
                errors.push("#{f}: ES6 add `default` to require #{requirePath}")

      if errors.length > 0
        grunt.log.error(err) for err in errors


        if /^export/gmi.test(content)
          if /^export\ default/gmi.test(content)
            esExportDefault[lookupPath] = true
          else
            esExport[lookupPath] = true
        else
          esNoExport[lookupPath] = true

      # blacklist = ["events", "main", "package", "task"]
      # for item in blacklist
      #   delete esExportDefault[item]
      #   delete esExport[item]
      #   delete esNoExport[item]

      # file.src is the list of all matching file names.
      for f in fileset.src
