Skip to content

Commit 4d7a5d3

Browse files
committed
refactor: prefix unused params with underscores
1 parent 488a28d commit 4d7a5d3

File tree

7 files changed

+169
-169
lines changed

7 files changed

+169
-169
lines changed

index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ function processDecompressParams (opts) {
204204
return params
205205
}
206206

207-
function buildRouteCompress (fastify, params, routeOptions, decorateOnly) {
207+
function buildRouteCompress (_fastify, params, routeOptions, decorateOnly) {
208208
// In order to provide a compress method with the same parameter set as the route itself,
209209
// we decorate the reply at the start of the request
210210
if (Array.isArray(routeOptions.onRequest)) {
@@ -216,7 +216,7 @@ function buildRouteCompress (fastify, params, routeOptions, decorateOnly) {
216216
}
217217

218218
const compressFn = compress(params)
219-
function onRequest (req, reply, next) {
219+
function onRequest (_req, reply, next) {
220220
reply.compress = compressFn
221221
next()
222222
}
@@ -291,7 +291,7 @@ function buildRouteCompress (fastify, params, routeOptions, decorateOnly) {
291291
}
292292
}
293293

294-
function buildRouteDecompress (fastify, params, routeOptions) {
294+
function buildRouteDecompress (_fastify, params, routeOptions) {
295295
// Add our decompress handler in the preParsing hook
296296
if (Array.isArray(routeOptions.preParsing)) {
297297
routeOptions.preParsing.unshift(preParsing)
@@ -301,7 +301,7 @@ function buildRouteDecompress (fastify, params, routeOptions) {
301301
routeOptions.preParsing = [preParsing]
302302
}
303303

304-
function preParsing (request, reply, raw, next) {
304+
function preParsing (request, _reply, raw, next) {
305305
// Get the encoding from the options or from the headers
306306
let encoding = params.forceEncoding
307307

0 commit comments

Comments
 (0)