lib/overcommit/plugins/pre_commit/js_syntax.rb in overcommit-0.1.9 vs lib/overcommit/plugins/pre_commit/js_syntax.rb in overcommit-0.1.10

- old
+ new

@@ -5,13 +5,13 @@ def run_check return :warn, 'Need either `jshint` or `rhino` in path' unless runner paths = staged.map { |s| s.path }.join(' ') - output = runner.call(paths).split("\n") + output = runner.call(paths) staged.each { |s| output = s.filter_string(output) } - return (output.none? ? :good : :bad), output + return (output.empty? ? :good : :bad), output end private JS_HINT_PATH = Overcommit::Utils.script_path 'jshint.js'