diff options
Diffstat (limited to 'tools/eslint/lib/rules/no-multiple-empty-lines.js')
-rw-r--r-- | tools/eslint/lib/rules/no-multiple-empty-lines.js | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/tools/eslint/lib/rules/no-multiple-empty-lines.js b/tools/eslint/lib/rules/no-multiple-empty-lines.js index 3b9169fa7e..679c4f69c7 100644 --- a/tools/eslint/lib/rules/no-multiple-empty-lines.js +++ b/tools/eslint/lib/rules/no-multiple-empty-lines.js @@ -146,7 +146,10 @@ module.exports = { context.report({ node, loc: node.loc.start, - message: "Too many blank lines at the beginning of file. Max of " + maxBOF + " allowed.", + message: "Too many blank lines at the beginning of file. Max of {{maxBOF}} allowed.", + data: { + maxBOF + }, fix }); } @@ -162,7 +165,7 @@ module.exports = { } else { const location = { line: lastLocation + 1, - column: 1 + column: 0 }; if (lastLocation < firstOfEndingBlankLines) { @@ -176,7 +179,11 @@ module.exports = { context.report({ node, loc: location, - message: "More than " + max + " blank " + (max === 1 ? "line" : "lines") + " not allowed.", + message: "More than {{max}} blank {{lines}} not allowed.", + data: { + max, + lines: (max === 1 ? "line" : "lines") + }, fix }); } @@ -190,7 +197,10 @@ module.exports = { context.report({ node, loc: location, - message: "Too many blank lines at the end of file. Max of " + maxEOF + " allowed.", + message: "Too many blank lines at the end of file. Max of {{maxEOF}} allowed.", + data: { + maxEOF + }, fix }); } |