summaryrefslogtreecommitdiff
path: root/tools/eslint/lib/rules/valid-jsdoc.js
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2016-09-09 17:07:54 -0700
committerRich Trott <rtrott@gmail.com>2016-09-12 21:11:55 -0700
commit2da2625ad16b09c25d7622c91ffe1d940e44e41a (patch)
tree1703937d59bd6723cbbd97a2219aaa5e301fad85 /tools/eslint/lib/rules/valid-jsdoc.js
parenta6b1f175c2368bb749c6c58a9d8df22e8c72a377 (diff)
downloadnode-new-2da2625ad16b09c25d7622c91ffe1d940e44e41a.tar.gz
tools: update ESLint to 3.5.0
PR-URL: https://github.com/nodejs/node/pull/8478 Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'tools/eslint/lib/rules/valid-jsdoc.js')
-rw-r--r--tools/eslint/lib/rules/valid-jsdoc.js16
1 files changed, 14 insertions, 2 deletions
diff --git a/tools/eslint/lib/rules/valid-jsdoc.js b/tools/eslint/lib/rules/valid-jsdoc.js
index f43b894a17..d6ebd24a4a 100644
--- a/tools/eslint/lib/rules/valid-jsdoc.js
+++ b/tools/eslint/lib/rules/valid-jsdoc.js
@@ -279,7 +279,13 @@ module.exports = {
hasReturns = true;
if (!requireReturn && !functionData.returnPresent && (tag.type === null || !isValidReturnType(tag)) && !isAbstract) {
- context.report(jsdocNode, "Unexpected @" + tag.title + " tag; function has no return statement.");
+ context.report({
+ node: jsdocNode,
+ message: "Unexpected @{{title}} tag; function has no return statement.",
+ data: {
+ title: tag.title
+ }
+ });
} else {
if (requireReturnType && !tag.type) {
context.report(jsdocNode, "Missing JSDoc return type.");
@@ -330,7 +336,13 @@ module.exports = {
node.parent.kind !== "get" && node.parent.kind !== "constructor" &&
node.parent.kind !== "set" && !isTypeClass(node)) {
if (requireReturn || functionData.returnPresent) {
- context.report(jsdocNode, "Missing JSDoc @" + (prefer.returns || "returns") + " for function.");
+ context.report({
+ node: jsdocNode,
+ message: "Missing JSDoc @{{returns}} for function.",
+ data: {
+ returns: prefer.returns || "returns"
+ }
+ });
}
}