summaryrefslogtreecommitdiff
path: root/tools/node_modules/eslint/lib/rules/no-useless-constructor.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-useless-constructor.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-useless-constructor.js')
-rw-r--r--tools/node_modules/eslint/lib/rules/no-useless-constructor.js36
1 files changed, 14 insertions, 22 deletions
diff --git a/tools/node_modules/eslint/lib/rules/no-useless-constructor.js b/tools/node_modules/eslint/lib/rules/no-useless-constructor.js
index c10376450e..7cf033805f 100644
--- a/tools/node_modules/eslint/lib/rules/no-useless-constructor.js
+++ b/tools/node_modules/eslint/lib/rules/no-useless-constructor.js
@@ -10,8 +10,7 @@
/**
* Checks whether a given array of statements is a single call of `super`.
- *
- * @param {ASTNode[]} body - An array of statements to check.
+ * @param {ASTNode[]} body An array of statements to check.
* @returns {boolean} `true` if the body is a single call of `super`.
*/
function isSingleSuperCall(body) {
@@ -26,8 +25,7 @@ function isSingleSuperCall(body) {
/**
* Checks whether a given node is a pattern which doesn't have any side effects.
* Default parameters and Destructuring parameters can have side effects.
- *
- * @param {ASTNode} node - A pattern node.
+ * @param {ASTNode} node A pattern node.
* @returns {boolean} `true` if the node doesn't have any side effects.
*/
function isSimple(node) {
@@ -37,8 +35,7 @@ function isSimple(node) {
/**
* Checks whether a given array of expressions is `...arguments` or not.
* `super(...arguments)` passes all arguments through.
- *
- * @param {ASTNode[]} superArgs - An array of expressions to check.
+ * @param {ASTNode[]} superArgs An array of expressions to check.
* @returns {boolean} `true` if the superArgs is `...arguments`.
*/
function isSpreadArguments(superArgs) {
@@ -52,9 +49,8 @@ function isSpreadArguments(superArgs) {
/**
* Checks whether given 2 nodes are identifiers which have the same name or not.
- *
- * @param {ASTNode} ctorParam - A node to check.
- * @param {ASTNode} superArg - A node to check.
+ * @param {ASTNode} ctorParam A node to check.
+ * @param {ASTNode} superArg A node to check.
* @returns {boolean} `true` if the nodes are identifiers which have the same
* name.
*/
@@ -68,9 +64,8 @@ function isValidIdentifierPair(ctorParam, superArg) {
/**
* Checks whether given 2 nodes are a rest/spread pair which has the same values.
- *
- * @param {ASTNode} ctorParam - A node to check.
- * @param {ASTNode} superArg - A node to check.
+ * @param {ASTNode} ctorParam A node to check.
+ * @param {ASTNode} superArg A node to check.
* @returns {boolean} `true` if the nodes are a rest/spread pair which has the
* same values.
*/
@@ -84,9 +79,8 @@ function isValidRestSpreadPair(ctorParam, superArg) {
/**
* Checks whether given 2 nodes have the same value or not.
- *
- * @param {ASTNode} ctorParam - A node to check.
- * @param {ASTNode} superArg - A node to check.
+ * @param {ASTNode} ctorParam A node to check.
+ * @param {ASTNode} superArg A node to check.
* @returns {boolean} `true` if the nodes have the same value or not.
*/
function isValidPair(ctorParam, superArg) {
@@ -99,9 +93,8 @@ function isValidPair(ctorParam, superArg) {
/**
* Checks whether the parameters of a constructor and the arguments of `super()`
* have the same values or not.
- *
- * @param {ASTNode} ctorParams - The parameters of a constructor to check.
- * @param {ASTNode} superArgs - The arguments of `super()` to check.
+ * @param {ASTNode} ctorParams The parameters of a constructor to check.
+ * @param {ASTNode} superArgs The arguments of `super()` to check.
* @returns {boolean} `true` if those have the same values.
*/
function isPassingThrough(ctorParams, superArgs) {
@@ -120,9 +113,8 @@ function isPassingThrough(ctorParams, superArgs) {
/**
* Checks whether the constructor body is a redundant super call.
- *
- * @param {Array} body - constructor body content.
- * @param {Array} ctorParams - The params to check against super call.
+ * @param {Array} body constructor body content.
+ * @param {Array} ctorParams The params to check against super call.
* @returns {boolean} true if the construtor body is redundant
*/
function isRedundantSuperCall(body, ctorParams) {
@@ -158,7 +150,7 @@ module.exports = {
/**
* Checks whether a node is a redundant constructor
- * @param {ASTNode} node - node to check
+ * @param {ASTNode} node node to check
* @returns {void}
*/
function checkForConstructor(node) {