Skip to content

Commit d2b8df4

Browse files
committed
chore: fix oxlint disable comment and add knip to pre-commit
Block-style disable/enable survives line insertions, preventing drift. Knip in pre-commit gives parity with CI.
1 parent 10e7493 commit d2b8df4

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

hk.pkl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ hooks {
1919
["tsc"] {
2020
check = "pnpm exec tsc --noEmit"
2121
}
22+
["knip"] {
23+
check = "pnpm run lint:knip"
24+
}
2225
}
2326
}
2427
["commit-msg"] {

src/serve.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,11 +316,12 @@ export async function serve(
316316

317317
if (manifestJson !== null) {
318318
app.get('/manifest.json', (c) => {
319-
// oxlint-disable-next-line typescript/consistent-type-assertions -- JSON.parse returns unknown, safe for manifest
319+
/* oxlint-disable typescript/consistent-type-assertions -- JSON.parse returns unknown, safe for manifest */
320320
return withSecurityHeaders(
321321
c.json(JSON.parse(manifestJson) as Record<string, unknown>),
322322
securityHeaders,
323323
)
324+
/* oxlint-enable typescript/consistent-type-assertions */
324325
})
325326
}
326327

0 commit comments

Comments
 (0)