From 3e44bfeccfa452e09125b7dc62d75a7bcafd9fb5 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Thu, 2 Jan 2025 11:37:06 +0000 Subject: [PATCH] refactor(example): prefix unused params with underscores Signed-off-by: Frazer Smith --- example/example.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/example.js b/example/example.js index db0d405..8ddf8d3 100644 --- a/example/example.js +++ b/example/example.js @@ -23,7 +23,7 @@ function compare (a, b) { } // `this` inside validate is `fastify` -function validate (username, password, req, reply, done) { +function validate (username, password, _req, _reply, done) { let result = true result = compare(username, validUsername) && result result = compare(password, validPassword) && result @@ -37,7 +37,7 @@ function validate (username, password, req, reply, done) { fastify.after(() => { fastify.addHook('onRequest', fastify.basicAuth) - fastify.get('/', (req, reply) => { + fastify.get('/', (_req, reply) => { reply.send({ hello: 'world' }) }) })