From 0fde1cc0ef857b939a97f21440a4edf1dc3511a3 Mon Sep 17 00:00:00 2001 From: Jason Eberle Date: Tue, 27 Oct 2015 14:52:20 -0400 Subject: [PATCH] Pass full path into Checker instead of relative AFAICT this path is only valuable to the Checker as a piece of information to pass to a reporter, so it makes sense to me to give the Checker the full filepath and let reporters sort out whether they want to display a relative path or not. --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index f194054..60214db 100644 --- a/index.js +++ b/index.js @@ -55,11 +55,11 @@ module.exports = function (opts) { var contents = file.contents.toString(); if (opts.fix) { - fixResults = checker.fixString(contents, file.relative); + fixResults = checker.fixString(contents, file.path); errors = fixResults.errors; file.contents = new Buffer(fixResults.output); } else { - errors = checker.checkString(contents, file.relative); + errors = checker.checkString(contents, file.path); } var errorList = errors.getErrorList();