From e0609dad8a716b77a88a60e188ab6c6f96ab13b1 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Tue, 7 Jan 2025 18:28:49 +0000 Subject: [PATCH] refactor(index): prefix unused params with underscores Signed-off-by: Frazer Smith --- index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index a913a9b..eee7194 100644 --- a/index.js +++ b/index.js @@ -11,7 +11,7 @@ const sessionProxyHandler = { // Calling functions eg request[sessionName].get('key') or request[sessionName].set('key', 'value') if (typeof target[prop] === 'function') { return new Proxy(target[prop], { - apply (applyTarget, thisArg, args) { + apply (applyTarget, _thisArg, args) { return Reflect.apply(applyTarget, target, args) } }) @@ -242,10 +242,10 @@ function fastifySecureSession (fastify, options, next) { next() - function addHooks (fastify, options, next) { + function addHooks (fastify, _options, next) { // the hooks must be registered after @fastify/cookie hooks - fastify.addHook('onRequest', (request, reply, next) => { + fastify.addHook('onRequest', (request, _reply, next) => { for (const [sessionName, { cookieName, cookieOptions }] of sessionNames.entries()) { let cookie = request.cookies[cookieName] @@ -265,7 +265,7 @@ function fastifySecureSession (fastify, options, next) { next() }) - fastify.addHook('onSend', (request, reply, payload, next) => { + fastify.addHook('onSend', (request, reply, _payload, next) => { for (const [sessionName, { cookieName, cookieOptions }] of sessionNames.entries()) { const session = request[sessionName]