Skip to content

Commit

Permalink
Fix: Column number for no-multiple-empty-lines (fixes #7086) (#7088)
Browse files Browse the repository at this point in the history
  • Loading branch information
IanVS authored and nzakas committed Sep 9, 2016
1 parent 6947299 commit 2a3f699
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/rules/no-multiple-empty-lines.js
Expand Up @@ -165,7 +165,7 @@ module.exports = {
} else {
const location = {
line: lastLocation + 1,
column: 1
column: 0
};

if (lastLocation < firstOfEndingBlankLines) {
Expand Down
9 changes: 6 additions & 3 deletions tests/lib/rules/no-multiple-empty-lines.js
Expand Up @@ -30,7 +30,8 @@ function getExpectedError(lines) {

return {
message,
type: "Program"
type: "Program",
column: 1
};
}

Expand All @@ -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
};
}

Expand All @@ -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
};
}

Expand Down

0 comments on commit 2a3f699

Please sign in to comment.