diff options
author | cjihrig <cjihrig@gmail.com> | 2019-10-25 12:48:14 -0700 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2019-10-28 09:51:24 -0400 |
commit | 511f67bcb42b59c9a3a3efab8fed578db100afe1 (patch) | |
tree | 8b64f390dd727dd739fd2fb84d69df3c829a9315 /tools/node_modules/eslint/lib/rules/no-unused-expressions.js | |
parent | b35181f877d5a92e8bb52eb071489f2a7d87494b (diff) | |
download | android-node-v8-511f67bcb42b59c9a3a3efab8fed578db100afe1.tar.gz android-node-v8-511f67bcb42b59c9a3a3efab8fed578db100afe1.tar.bz2 android-node-v8-511f67bcb42b59c9a3a3efab8fed578db100afe1.zip |
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 <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'tools/node_modules/eslint/lib/rules/no-unused-expressions.js')
-rw-r--r-- | tools/node_modules/eslint/lib/rules/no-unused-expressions.js | 18 |
1 files changed, 11 insertions, 7 deletions
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) { |