fix: address PR review comments

- Fix KV json overload to return Promise<unknown | null> (null on missing keys)
- Add shebang to Husky pre-commit hook
- Explicitly add eslint ^10.0.0 to devDependencies

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Julien Herr
2026-05-21 12:09:26 +02:00
parent b24ee969d1
commit b26990a875
3 changed files with 3 additions and 1 deletions
+1
View File
@@ -1 +1,2 @@
#!/bin/sh
npx lint-staged && npm run typecheck && npm test npx lint-staged && npm run typecheck && npm test
+1
View File
@@ -32,6 +32,7 @@
"@types/mailparser": "^3.4.6", "@types/mailparser": "^3.4.6",
"@types/rss": "^0.0.32", "@types/rss": "^0.0.32",
"@vitest/coverage-v8": "^4.0.18", "@vitest/coverage-v8": "^4.0.18",
"eslint": "^10.0.0",
"eslint-config-prettier": "^10.1.8", "eslint-config-prettier": "^10.1.8",
"happy-dom": "^20.5.0", "happy-dom": "^20.5.0",
"husky": "^9.1.7", "husky": "^9.1.7",
+1 -1
View File
@@ -71,7 +71,7 @@ declare global {
// This is not an ideal solution but works for our example // This is not an ideal solution but works for our example
interface KVNamespace { interface KVNamespace {
get(key: string, options?: { type: "text" }): Promise<string | null>; get(key: string, options?: { type: "text" }): Promise<string | null>;
get(key: string, options: { type: "json" }): Promise<unknown>; get(key: string, options: { type: "json" }): Promise<unknown | null>;
get( get(
key: string, key: string,
options: { type: "arrayBuffer" }, options: { type: "arrayBuffer" },