Skip to content

Commit

Permalink
Fix: multiline-comment-style incorrect message (#11864)
Browse files Browse the repository at this point in the history
  • Loading branch information
golopot authored and not-an-aardvark committed Jun 21, 2019
1 parent cad074d commit ded9548
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/rules/multiline-comment-style.js
Expand Up @@ -25,6 +25,7 @@ module.exports = {
schema: [{ enum: ["starred-block", "separate-lines", "bare-block"] }],
messages: {
expectedBlock: "Expected a block comment instead of consecutive line comments.",
expectedBareBlock: "Expected a block comment without padding stars.",
startNewline: "Expected a linebreak after '/*'.",
endNewline: "Expected a linebreak before '*/'.",
missingStar: "Expected a '*' at the start of this line.",
Expand Down Expand Up @@ -250,7 +251,7 @@ module.exports = {
start: block.loc.start,
end: { line: block.loc.start.line, column: block.loc.start.column + 2 }
},
messageId: "expectedBlock",
messageId: "expectedBareBlock",
fix(fixer) {
return fixer.replaceText(block, convertToBlock(block, commentLines.filter(line => line)));
}
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/rules/multiline-comment-style.js
Expand Up @@ -481,7 +481,7 @@ ruleTester.run("multiline-comment-style", rule, {
bar */
`,
options: ["bare-block"],
errors: [{ messageId: "expectedBlock", line: 2 }]
errors: [{ messageId: "expectedBareBlock", line: 2 }]
}
]
});

0 comments on commit ded9548

Please sign in to comment.