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:
cjihrig 2019-03-01 21:47:17 -05:00
parent 8c597df350
commit 17b7fa75c3
No known key found for this signature in database
GPG key ID: 7434390BDBE9B9C5
111 changed files with 471 additions and 409 deletions

View file

@ -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;