summaryrefslogtreecommitdiff
path: root/tools/node_modules/eslint/lib/rules/max-nested-callbacks.js
diff options
context:
space:
mode:
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.js11
1 files changed, 6 insertions, 5 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 cbbb0ed6c7..df1baceeb4 100644
--- a/tools/node_modules/eslint/lib/rules/max-nested-callbacks.js
+++ b/tools/node_modules/eslint/lib/rules/max-nested-callbacks.js
@@ -32,13 +32,11 @@ module.exports = {
properties: {
maximum: {
type: "integer",
- minimum: 0,
- default: 10
+ minimum: 0
},
max: {
type: "integer",
- minimum: 0,
- default: 10
+ minimum: 0
}
},
additionalProperties: false
@@ -59,7 +57,10 @@ module.exports = {
const option = context.options[0];
let THRESHOLD = 10;
- if (typeof option === "object") {
+ if (
+ typeof option === "object" &&
+ (Object.prototype.hasOwnProperty.call(option, "maximum") || Object.prototype.hasOwnProperty.call(option, "max"))
+ ) {
THRESHOLD = option.maximum || option.max;
} else if (typeof option === "number") {
THRESHOLD = option;