From 2a3f69984e468fb67ac69052e2e96c8048ede933 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Fri, 9 Sep 2016 15:03:33 -0400 Subject: [PATCH] Fix: Column number for no-multiple-empty-lines (fixes #7086) (#7088) --- lib/rules/no-multiple-empty-lines.js | 2 +- tests/lib/rules/no-multiple-empty-lines.js | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/rules/no-multiple-empty-lines.js b/lib/rules/no-multiple-empty-lines.js index c7f69784366..679c4f69c73 100644 --- a/lib/rules/no-multiple-empty-lines.js +++ b/lib/rules/no-multiple-empty-lines.js @@ -165,7 +165,7 @@ module.exports = { } else { const location = { line: lastLocation + 1, - column: 1 + column: 0 }; if (lastLocation < firstOfEndingBlankLines) { diff --git a/tests/lib/rules/no-multiple-empty-lines.js b/tests/lib/rules/no-multiple-empty-lines.js index 877de202284..c363f97241b 100644 --- a/tests/lib/rules/no-multiple-empty-lines.js +++ b/tests/lib/rules/no-multiple-empty-lines.js @@ -30,7 +30,8 @@ function getExpectedError(lines) { return { message, - type: "Program" + type: "Program", + column: 1 }; } @@ -47,7 +48,8 @@ function getExpectedErrorEOF(lines) { return { message: "Too many blank lines at the end of file. Max of " + lines + " allowed.", - type: "Program" + type: "Program", + column: 1 }; } @@ -64,7 +66,8 @@ function getExpectedErrorBOF(lines) { return { message: "Too many blank lines at the beginning of file. Max of " + lines + " allowed.", - type: "Program" + type: "Program", + column: 1 }; }