mirror of
https://github.com/Ryujinx/Ryujinx-Ldn-Website.git
synced 2024-12-22 08:25:37 +00:00
Update no-unused-vars rule
This commit is contained in:
parent
169a0a3bdc
commit
7f2d7bab00
14
.eslintrc.js
14
.eslintrc.js
|
@ -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
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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, {
|
||||
|
|
Loading…
Reference in a new issue