mirror of
https://github.com/Ryujinx/Ryujinx-Ldn-Website.git
synced 2024-12-22 19:05:27 +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',
|
parser: '@typescript-eslint/parser',
|
||||||
plugins: ['@typescript-eslint'],
|
plugins: ['@typescript-eslint'],
|
||||||
root: true,
|
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();
|
const router = Router();
|
||||||
|
|
||||||
router.get("/", async (req, res, next) => {
|
router.get("/", async (_req, res, _next) => {
|
||||||
if (!redisClient.isOpen) {
|
if (!redisClient.isOpen) {
|
||||||
await redisClient.connect();
|
await redisClient.connect();
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ router.get("/", async (req, res, next) => {
|
||||||
return res.send(result);
|
return res.send(result);
|
||||||
});
|
});
|
||||||
|
|
||||||
router.get("/public_games", async (req, res, next) => {
|
router.get("/public_games", async (req, res, _next) => {
|
||||||
let gameFilter = "";
|
let gameFilter = "";
|
||||||
|
|
||||||
if (req.query.titleid != null && (req.query.titleid as string)?.length > 0) {
|
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 { logger } from "./app";
|
||||||
import { loggerDefaultMetadata } from "./utils";
|
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));
|
logger.debug("Incoming request.", loggerDefaultMetadata(req));
|
||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
|
@ -10,7 +14,7 @@ export function requestLogger(req: Request, res: Response, next: NextFunction) {
|
||||||
export function errorLogger(
|
export function errorLogger(
|
||||||
err: Error,
|
err: Error,
|
||||||
req: Request,
|
req: Request,
|
||||||
res: Response,
|
_res: Response,
|
||||||
next: NextFunction
|
next: NextFunction
|
||||||
) {
|
) {
|
||||||
logger.error(err.message, {
|
logger.error(err.message, {
|
||||||
|
|
Loading…
Reference in a new issue