From 2986633b6d632a82b4686210441a96e0ba9acffe Mon Sep 17 00:00:00 2001 From: Fabio Elia Date: Mon, 12 Dec 2016 10:39:50 -0500 Subject: [PATCH] Add eslint reporter --- index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 1c7820d..356d58c 100644 --- a/index.js +++ b/index.js @@ -189,7 +189,9 @@ module.exports = function (options) { eslint_output = ['**Please fix these eslint issues first:**'], opt = options || {}, jshint_reporter = opt.jshint_reporter || jshint_simple_reporter, - jscs_reporter = opt.jscs_reporter || jscs_simple_reporter; + jscs_reporter = opt.jscs_reporter || jscs_simple_reporter, + eslint_reporter = opt.eslint_reporter || eslint_simple_reporter; + return through.obj(function (file, enc, callback) { if (file.jshint && !file.jshint.success && !file.jshint.ignored) { @@ -206,7 +208,7 @@ module.exports = function (options) { if (file.eslint) { file.eslint.messages.forEach(function (E) { - eslint_output.push(eslint_simple_reporter(E, file)); + eslint_output.push(eslint_reporter(E, file)); }); }