summaryrefslogtreecommitdiff
path: root/tools/node_modules/eslint/lib/rules/lines-around-comment.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/node_modules/eslint/lib/rules/lines-around-comment.js')
-rw-r--r--tools/node_modules/eslint/lib/rules/lines-around-comment.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/node_modules/eslint/lib/rules/lines-around-comment.js b/tools/node_modules/eslint/lib/rules/lines-around-comment.js
index 30175cd366..62bef94831 100644
--- a/tools/node_modules/eslint/lib/rules/lines-around-comment.js
+++ b/tools/node_modules/eslint/lib/rules/lines-around-comment.js
@@ -112,7 +112,11 @@ module.exports = {
},
additionalProperties: false
}
- ]
+ ],
+ messages: {
+ after: "Expected line after comment.",
+ before: "Expected line before comment."
+ }
},
create(context) {
@@ -350,7 +354,7 @@ module.exports = {
context.report({
node: token,
- message: "Expected line before comment.",
+ messageId: "before",
fix(fixer) {
return fixer.insertTextBeforeRange(range, "\n");
}
@@ -362,7 +366,7 @@ module.exports = {
!(astUtils.isCommentToken(nextTokenOrComment) && astUtils.isTokenOnSameLine(token, nextTokenOrComment))) {
context.report({
node: token,
- message: "Expected line after comment.",
+ messageId: "after",
fix(fixer) {
return fixer.insertTextAfter(token, "\n");
}