aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/pronto
diff options
context:
space:
mode:
authorMindaugas Mozūras <mindaugas.mozuras@gmail.com>2016-03-14 23:08:08 +0200
committerMindaugas Mozūras <mindaugas.mozuras@gmail.com>2016-03-14 23:08:08 +0200
commitb338a7ad2866cec61a0409fc0745c18d8883d9c8 (patch)
tree8114f644ee40ef58e20f9185ce269c3a0e15d2dd /lib/pronto
parentdb8f1f434e7ffc9f57eef0758a19e9ad63dab827 (diff)
downloadpronto-hlint-b338a7ad2866cec61a0409fc0745c18d8883d9c8.tar.gz
pronto-hlint-b338a7ad2866cec61a0409fc0745c18d8883d9c8.tar.zst
pronto-hlint-b338a7ad2866cec61a0409fc0745c18d8883d9c8.zip
Depend on newest versions of pronto and eslint (less strictly)
Diffstat (limited to 'lib/pronto')
-rw-r--r--lib/pronto/eslint.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/pronto/eslint.rb b/lib/pronto/eslint.rb
index 67e9229..b6ccff1 100644
--- a/lib/pronto/eslint.rb
+++ b/lib/pronto/eslint.rb
@@ -3,10 +3,10 @@ require 'eslintrb'
3 3
4module Pronto 4module Pronto
5 class ESLint < Runner 5 class ESLint < Runner
6 def run(patches, _) 6 def run
7 return [] unless patches 7 return [] unless @patches
8 8
9 patches.select { |patch| patch.additions > 0 } 9 @patches.select { |patch| patch.additions > 0 }
10 .select { |patch| js_file?(patch.new_file_full_path) } 10 .select { |patch| js_file?(patch.new_file_full_path) }
11 .map { |patch| inspect(patch) } 11 .map { |patch| inspect(patch) }
12 .flatten.compact 12 .flatten.compact
@@ -26,7 +26,7 @@ module Pronto
26 path = line.patch.delta.new_file[:path] 26 path = line.patch.delta.new_file[:path]
27 level = :warning 27 level = :warning
28 28
29 Message.new(path, line, level, offence['message']) 29 Message.new(path, line, level, offence['message'], nil, self.class)
30 end 30 end
31 31
32 def js_file?(path) 32 def js_file?(path)