Update no-unused-vars rule

This commit is contained in:
TSR Berry 2024-03-08 23:23:31 +01:00
parent 169a0a3bdc
commit 7f2d7bab00
No known key found for this signature in database
GPG key ID: 52353C0A4CCA15E2
3 changed files with 22 additions and 4 deletions

View file

@ -4,4 +4,18 @@ module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
root: true,
rules: {
"@typescript-eslint/no-unused-vars": [
"error",
{
"args": "all",
"argsIgnorePattern": "^_",
"caughtErrors": "all",
"caughtErrorsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
]
}
};

View file

@ -3,7 +3,7 @@ import { redisClient } from "./app";
const router = Router();
router.get("/", async (req, res, next) => {
router.get("/", async (_req, res, _next) => {
if (!redisClient.isOpen) {
await redisClient.connect();
}
@ -17,7 +17,7 @@ router.get("/", async (req, res, next) => {
return res.send(result);
});
router.get("/public_games", async (req, res, next) => {
router.get("/public_games", async (req, res, _next) => {
let gameFilter = "";
if (req.query.titleid != null && (req.query.titleid as string)?.length > 0) {

View file

@ -2,7 +2,11 @@ import { Request, Response, NextFunction } from "express";
import { logger } from "./app";
import { loggerDefaultMetadata } from "./utils";
export function requestLogger(req: Request, res: Response, next: NextFunction) {
export function requestLogger(
req: Request,
_res: Response,
next: NextFunction
) {
logger.debug("Incoming request.", loggerDefaultMetadata(req));
next();
}
@ -10,7 +14,7 @@ export function requestLogger(req: Request, res: Response, next: NextFunction) {
export function errorLogger(
err: Error,
req: Request,
res: Response,
_res: Response,
next: NextFunction
) {
logger.error(err.message, {