ignoring eslint errors if argument begins with _

This commit is contained in:
Miodec 2022-02-01 18:13:40 +01:00
parent 4167bcffe6
commit 05d3ead9ce
2 changed files with 3 additions and 2 deletions

View file

@ -13,6 +13,7 @@
"indent": ["error", 2],
"linebreak-style": ["error", "unix"],
"quotes": ["error", "double"],
"semi": ["error", "always"]
"semi": ["error", "always"],
"no-unused-vars": ["error", { "argsIgnorePattern": "^_" }]
}
}

View file

@ -39,7 +39,7 @@ app.use((req, res, next) => {
addApiRoutes(app);
//DO NOT REMOVE NEXT, EVERYTHING WILL EXPLODE
app.use(function (e, req, res, next) {
app.use(function (e, req, res, _next) {
if (/ECONNREFUSED.*27017/i.test(e.message)) {
e.message = "Could not connect to the database. It may have crashed.";
delete e.stack;