diff options
author | cjihrig <cjihrig@gmail.com> | 2019-02-15 16:51:43 -0500 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2019-02-17 21:56:18 -0500 |
commit | 77b39c2eb2c9fe437d0e09e3e7682564d815c7fb (patch) | |
tree | a10a28bd5022e46c7ba49103282f63a80bf08886 /tools/node_modules/eslint/lib/rules/max-nested-callbacks.js | |
parent | 2da7ff5e969538a19c27e6929d435094347f90a8 (diff) | |
download | android-node-v8-77b39c2eb2c9fe437d0e09e3e7682564d815c7fb.tar.gz android-node-v8-77b39c2eb2c9fe437d0e09e3e7682564d815c7fb.tar.bz2 android-node-v8-77b39c2eb2c9fe437d0e09e3e7682564d815c7fb.zip |
tools: update ESLint to 5.14.0
Update ESLint to 5.14.0
PR-URL: https://github.com/nodejs/node/pull/26142
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Wyatt Preul <wpreul@gmail.com>
Diffstat (limited to 'tools/node_modules/eslint/lib/rules/max-nested-callbacks.js')
-rw-r--r-- | tools/node_modules/eslint/lib/rules/max-nested-callbacks.js | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/tools/node_modules/eslint/lib/rules/max-nested-callbacks.js b/tools/node_modules/eslint/lib/rules/max-nested-callbacks.js index 754fa168d3..cbbb0ed6c7 100644 --- a/tools/node_modules/eslint/lib/rules/max-nested-callbacks.js +++ b/tools/node_modules/eslint/lib/rules/max-nested-callbacks.js @@ -32,11 +32,13 @@ module.exports = { properties: { maximum: { type: "integer", - minimum: 0 + minimum: 0, + default: 10 }, max: { type: "integer", - minimum: 0 + minimum: 0, + default: 10 } }, additionalProperties: false @@ -57,13 +59,9 @@ module.exports = { const option = context.options[0]; let THRESHOLD = 10; - if (typeof option === "object" && Object.prototype.hasOwnProperty.call(option, "maximum") && typeof option.maximum === "number") { - THRESHOLD = option.maximum; - } - if (typeof option === "object" && Object.prototype.hasOwnProperty.call(option, "max") && typeof option.max === "number") { - THRESHOLD = option.max; - } - if (typeof option === "number") { + if (typeof option === "object") { + THRESHOLD = option.maximum || option.max; + } else if (typeof option === "number") { THRESHOLD = option; } |