summaryrefslogtreecommitdiff
path: root/tools/node_modules/eslint/lib/rules/no-mixed-operators.js
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2019-10-25 12:48:14 -0700
committercjihrig <cjihrig@gmail.com>2019-10-28 09:51:24 -0400
commit511f67bcb42b59c9a3a3efab8fed578db100afe1 (patch)
tree8b64f390dd727dd739fd2fb84d69df3c829a9315 /tools/node_modules/eslint/lib/rules/no-mixed-operators.js
parentb35181f877d5a92e8bb52eb071489f2a7d87494b (diff)
downloadandroid-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-mixed-operators.js')
-rw-r--r--tools/node_modules/eslint/lib/rules/no-mixed-operators.js35
1 files changed, 13 insertions, 22 deletions
diff --git a/tools/node_modules/eslint/lib/rules/no-mixed-operators.js b/tools/node_modules/eslint/lib/rules/no-mixed-operators.js
index 8d1c7a6af4..80fac79aff 100644
--- a/tools/node_modules/eslint/lib/rules/no-mixed-operators.js
+++ b/tools/node_modules/eslint/lib/rules/no-mixed-operators.js
@@ -40,8 +40,7 @@ const TARGET_NODE_TYPE = /^(?:Binary|Logical|Conditional)Expression$/u;
/**
* Normalizes options.
- *
- * @param {Object|undefined} options - A options object to normalize.
+ * @param {Object|undefined} options A options object to normalize.
* @returns {Object} Normalized option object.
*/
function normalizeOptions(options = {}) {
@@ -57,10 +56,9 @@ function normalizeOptions(options = {}) {
/**
* Checks whether any group which includes both given operator exists or not.
- *
- * @param {Array.<string[]>} groups - A list of groups to check.
- * @param {string} left - An operator.
- * @param {string} right - Another operator.
+ * @param {Array.<string[]>} groups A list of groups to check.
+ * @param {string} left An operator.
+ * @param {string} right Another operator.
* @returns {boolean} `true` if such group existed.
*/
function includesBothInAGroup(groups, left, right) {
@@ -69,8 +67,7 @@ function includesBothInAGroup(groups, left, right) {
/**
* Checks whether the given node is a conditional expression and returns the test node else the left node.
- *
- * @param {ASTNode} node - A node which can be a BinaryExpression or a LogicalExpression node.
+ * @param {ASTNode} node A node which can be a BinaryExpression or a LogicalExpression node.
* This parent node can be BinaryExpression, LogicalExpression
* , or a ConditionalExpression node
* @returns {ASTNode} node the appropriate node(left or test).
@@ -124,8 +121,7 @@ module.exports = {
/**
* Checks whether a given node should be ignored by options or not.
- *
- * @param {ASTNode} node - A node to check. This is a BinaryExpression
+ * @param {ASTNode} node A node to check. This is a BinaryExpression
* node or a LogicalExpression node. This parent node is one of
* them, too.
* @returns {boolean} `true` if the node should be ignored.
@@ -146,8 +142,7 @@ module.exports = {
/**
* Checks whether the operator of a given node is mixed with parent
* node's operator or not.
- *
- * @param {ASTNode} node - A node to check. This is a BinaryExpression
+ * @param {ASTNode} node A node to check. This is a BinaryExpression
* node or a LogicalExpression node. This parent node is one of
* them, too.
* @returns {boolean} `true` if the node was mixed.
@@ -163,8 +158,7 @@ module.exports = {
/**
* Checks whether the operator of a given node is mixed with a
* conditional expression.
- *
- * @param {ASTNode} node - A node to check. This is a conditional
+ * @param {ASTNode} node A node to check. This is a conditional
* expression node
* @returns {boolean} `true` if the node was mixed.
*/
@@ -174,8 +168,7 @@ module.exports = {
/**
* Gets the operator token of a given node.
- *
- * @param {ASTNode} node - A node to check. This is a BinaryExpression
+ * @param {ASTNode} node A node to check. This is a BinaryExpression
* node or a LogicalExpression node.
* @returns {Token} The operator token of the node.
*/
@@ -186,8 +179,7 @@ module.exports = {
/**
* Reports both the operator of a given node and the operator of the
* parent node.
- *
- * @param {ASTNode} node - A node to check. This is a BinaryExpression
+ * @param {ASTNode} node A node to check. This is a BinaryExpression
* node or a LogicalExpression node. This parent node is one of
* them, too.
* @returns {void}
@@ -205,13 +197,13 @@ module.exports = {
context.report({
node: left,
- loc: getOperatorToken(left).loc.start,
+ loc: getOperatorToken(left).loc,
message,
data
});
context.report({
node: right,
- loc: getOperatorToken(right).loc.start,
+ loc: getOperatorToken(right).loc,
message,
data
});
@@ -220,8 +212,7 @@ module.exports = {
/**
* Checks between the operator of this node and the operator of the
* parent node.
- *
- * @param {ASTNode} node - A node to check.
+ * @param {ASTNode} node A node to check.
* @returns {void}
*/
function check(node) {