Skip to content

Commit 0e98c56

Browse files
authored
chore(fastify-htmx): remove unused variables/parameters (#281)
1 parent 2684343 commit 0e98c56

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

packages/fastify-htmx/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ async function prepareClient(clientModule, scope, config) {
107107
}
108108

109109
// The return value of this function gets registered as reply.html()
110-
export function createHtmlFunction(source, scope, config) {
110+
export function createHtmlFunction(source, _, config) {
111111
const htmlTemplate = config.createHtmlTemplateFunction(source)
112112
return function (ctx) {
113113
this.type('text/html')
@@ -116,7 +116,7 @@ export function createHtmlFunction(source, scope, config) {
116116
}
117117
}
118118

119-
export function createRouteHandler({ client, route }, scope, config) {
119+
export function createRouteHandler({ client, route }, scope) {
120120
if (route.fragment) {
121121
return async (req, reply) => {
122122
req.route = route

packages/fastify-htmx/plugin.cjs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
const { readFileSync, existsSync } = require('fs')
2-
const { dirname, join, resolve } = require('path')
3-
const { fileURLToPath } = require('url')
1+
const { readFileSync, existsSync } = require('node:fs')
2+
const { resolve } = require('node:path')
43
const inject = require('@rollup/plugin-inject')
54

6-
function viteFastifyHtmx(config = {}) {
5+
function viteFastifyHtmx() {
76
const prefix = /^\/:/
87
const virtualRoot = resolve(__dirname, 'virtual')
98
const virtualModules = [
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Suspense } from '@kitajs/html/suspense.js'
22
// This file serves as a placeholder if no layout.jsx file is provided
33

4-
export default function Layout({ app, req, reply, children }) {
4+
export default function Layout({ children }) {
55
return <Suspense>{children}</Suspense>
66
}

0 commit comments

Comments
 (0)