mirror of
https://github.com/nodejs/node.git
synced 2025-08-16 06:08:50 +02:00
tools: update ESLint to 5.15.0
Update ESLint to 5.15.0 PR-URL: https://github.com/nodejs/node/pull/26391 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Masashi Hirano <shisama07@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
parent
8c597df350
commit
17b7fa75c3
111 changed files with 471 additions and 409 deletions
11
tools/node_modules/eslint/lib/rules/complexity.js
generated
vendored
11
tools/node_modules/eslint/lib/rules/complexity.js
generated
vendored
|
@ -41,13 +41,11 @@ module.exports = {
|
|||
properties: {
|
||||
maximum: {
|
||||
type: "integer",
|
||||
minimum: 0,
|
||||
default: 20
|
||||
minimum: 0
|
||||
},
|
||||
max: {
|
||||
type: "integer",
|
||||
minimum: 0,
|
||||
default: 20
|
||||
minimum: 0
|
||||
}
|
||||
},
|
||||
additionalProperties: false
|
||||
|
@ -65,7 +63,10 @@ module.exports = {
|
|||
const option = context.options[0];
|
||||
let THRESHOLD = 20;
|
||||
|
||||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue