diff --git a/.eslintrc b/.eslintrc index 65071de80a..9f457493c4 100644 --- a/.eslintrc +++ b/.eslintrc @@ -81,8 +81,8 @@ "o-eq-null": "off", "no-cond-assign": "off", "no-eq-null": "off", - "no-redeclare": "off", - "no-unreachable": "off", + // "no-redeclare": "off", + // "no-unreachable": "off", // "no-nested-ternary": "off", // "operator-linebreak": "off", // "guard-for-in": "off", diff --git a/src/meta/blacklist.js b/src/meta/blacklist.js index 49213ac92c..2c17c488b1 100644 --- a/src/meta/blacklist.js +++ b/src/meta/blacklist.js @@ -99,18 +99,18 @@ Blacklist.validate = function (rules, callback) { if (ip.isV4Format(rule)) { ipv4.push(rule); return true; - } else if (ip.isV6Format(rule)) { + } + if (ip.isV6Format(rule)) { ipv6.push(rule); return true; - } else if (isCidrSubnet.test(rule)) { + } + if (isCidrSubnet.test(rule)) { cidr.push(rule); return true; - } else { - invalid.push(rule); - return false; } - return true; + invalid.push(rule); + return false; }); callback(null, { diff --git a/src/routes/index.js b/src/routes/index.js index 40688539a4..1091a50fe9 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -132,7 +132,7 @@ module.exports = function (app, middleware, hotswapIds) { userRoutes(router, middleware, controllers); groupRoutes(router, middleware, controllers); - for (var x = 0; x < routers.length; x += 1) { + for (x = 0; x < routers.length; x += 1) { app.use(relativePath, routers[x]); }