From 511f67bcb42b59c9a3a3efab8fed578db100afe1 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Fri, 25 Oct 2019 12:48:14 -0700 Subject: tools: update ESLint to 6.6.0 Update ESLint to 6.6.0 PR-URL: https://github.com/nodejs/node/pull/30123 Reviewed-By: Luigi Pinca Reviewed-By: Rich Trott Reviewed-By: Yongsheng Zhang Reviewed-By: Trivikram Kamat --- .../eslint/lib/rules/no-unused-expressions.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'tools/node_modules/eslint/lib/rules/no-unused-expressions.js') diff --git a/tools/node_modules/eslint/lib/rules/no-unused-expressions.js b/tools/node_modules/eslint/lib/rules/no-unused-expressions.js index 02cce309ee..fd0440256b 100644 --- a/tools/node_modules/eslint/lib/rules/no-unused-expressions.js +++ b/tools/node_modules/eslint/lib/rules/no-unused-expressions.js @@ -47,8 +47,9 @@ module.exports = { allowTernary = config.allowTernary || false, allowTaggedTemplates = config.allowTaggedTemplates || false; + // eslint-disable-next-line jsdoc/require-description /** - * @param {ASTNode} node - any node + * @param {ASTNode} node any node * @returns {boolean} whether the given node structurally represents a directive */ function looksLikeDirective(node) { @@ -56,9 +57,10 @@ module.exports = { node.expression.type === "Literal" && typeof node.expression.value === "string"; } + // eslint-disable-next-line jsdoc/require-description /** - * @param {Function} predicate - ([a] -> Boolean) the function used to make the determination - * @param {a[]} list - the input list + * @param {Function} predicate ([a] -> Boolean) the function used to make the determination + * @param {a[]} list the input list * @returns {a[]} the leading sequence of members in the given list that pass the given predicate */ function takeWhile(predicate, list) { @@ -70,17 +72,19 @@ module.exports = { return list.slice(); } + // eslint-disable-next-line jsdoc/require-description /** - * @param {ASTNode} node - a Program or BlockStatement node + * @param {ASTNode} node a Program or BlockStatement node * @returns {ASTNode[]} the leading sequence of directive nodes in the given node's body */ function directives(node) { return takeWhile(looksLikeDirective, node.body); } + // eslint-disable-next-line jsdoc/require-description /** - * @param {ASTNode} node - any node - * @param {ASTNode[]} ancestors - the given node's ancestors + * @param {ASTNode} node any node + * @param {ASTNode[]} ancestors the given node's ancestors * @returns {boolean} whether the given node is considered a directive in its current position */ function isDirective(node, ancestors) { @@ -94,7 +98,7 @@ module.exports = { /** * Determines whether or not a given node is a valid expression. Recurses on short circuit eval and ternary nodes if enabled by flags. - * @param {ASTNode} node - any node + * @param {ASTNode} node any node * @returns {boolean} whether the given node is a valid expression */ function isValidExpression(node) { -- cgit v1.2.3