chore(lint): fix no-unused-vars errors

This commit is contained in:
Panagiotis Papadopoulos 2025-03-06 23:21:47 +01:00
parent c8e36942fc
commit 7feb38ffa1
8 changed files with 6 additions and 8 deletions

View File

@ -82,7 +82,7 @@ function updateImage(req: Request) {
const { noteId } = req.params;
const { file } = req;
const note = becca.getNoteOrThrow(noteId);
const _note = becca.getNoteOrThrow(noteId);
if (!file) {
return {

View File

@ -5,7 +5,6 @@ import protectedSessionService from "../../services/protected_session.js";
import noteService from "../../services/notes.js";
import becca from "../../becca/becca.js";
import type { Request } from "express";
import type { RevisionRow } from "../../becca/entities/rows.js";
interface RecentChangeRow {
noteId: string;

View File

@ -30,7 +30,7 @@ function getRelationMap(req: Request) {
return resp;
}
const questionMarks = noteIds.map((noteId) => "?").join(",");
const questionMarks = noteIds.map((_noteId) => "?").join(",");
const relationMapNote = becca.getNoteOrThrow(relationMapNoteId);

View File

@ -1,7 +1,6 @@
"use strict";
import beccaService from "../../becca/becca_service.js";
import revisionService from "../../services/revisions.js";
import utils from "../../services/utils.js";
import sql from "../../services/sql.js";
import cls from "../../services/cls.js";

View File

@ -8,7 +8,7 @@ import becca from "../../becca/becca.js";
async function getSimilarNotes(req: Request) {
const noteId = req.params.noteId;
const note = becca.getNoteOrThrow(noteId);
const _note = becca.getNoteOrThrow(noteId);
return await similarityService.findSimilarNotes(noteId);
}

View File

@ -1,4 +1,4 @@
import type { Application, Router } from "express";
import type { Application } from "express";
import swaggerUi from "swagger-ui-express";
import { readFile } from "fs/promises";
import { fileURLToPath } from "url";

View File

@ -68,7 +68,7 @@ function handleRequest(req: Request, res: Response) {
function register(router: Router) {
// explicitly no CSRF middleware since it's meant to allow integration from external services
router.all("/custom/:path*", (req: Request, res: Response, next) => {
router.all("/custom/:path*", (req: Request, res: Response, _next) => {
cls.namespace.bindEmitter(req);
cls.namespace.bindEmitter(res);

View File

@ -22,7 +22,7 @@ function register(app: Application) {
});
// error handler
app.use((err: any, req: Request, res: Response, next: NextFunction) => {
app.use((err: any, req: Request, res: Response, _next: NextFunction) => {
if (err.status !== 404) {
log.info(err);
} else {