]> git.immae.eu Git - github/fretlink/pronto-hlint.git/blobdiff - lib/pronto/eslint.rb
Depend on newest versions of pronto and eslint (less strictly)
[github/fretlink/pronto-hlint.git] / lib / pronto / eslint.rb
index 67e9229021ea9f2a3f8858f04793363ad30cd123..b6ccff1fee5f2c17b51393f6b70ce1d59f0b4697 100644 (file)
@@ -3,10 +3,10 @@ require 'eslintrb'
 
 module Pronto
   class ESLint < Runner
-    def run(patches, _)
-      return [] unless patches
+    def run
+      return [] unless @patches
 
-      patches.select { |patch| patch.additions > 0 }
+      @patches.select { |patch| patch.additions > 0 }
         .select { |patch| js_file?(patch.new_file_full_path) }
         .map { |patch| inspect(patch) }
         .flatten.compact
@@ -26,7 +26,7 @@ module Pronto
       path = line.patch.delta.new_file[:path]
       level = :warning
 
-      Message.new(path, line, level, offence['message'])
+      Message.new(path, line, level, offence['message'], nil, self.class)
     end
 
     def js_file?(path)