mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-06 20:41:17 +01:00
ESlint no-unreachable, no-redeclare
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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, {
|
||||
|
||||
@@ -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]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user