diff --git a/deno_dist/client/client.ts b/deno_dist/client/client.ts index de04ee7f4..4d2d9cbf0 100644 --- a/deno_dist/client/client.ts +++ b/deno_dist/client/client.ts @@ -84,7 +84,6 @@ class ClientRequestImpl { } let methodUpperCase = this.method.toUpperCase() - let setBody = !(methodUpperCase === 'GET' || methodUpperCase === 'HEAD') const headerValues: Record = { ...(args?.header ?? {}), @@ -117,7 +116,7 @@ class ClientRequestImpl { url = url + '?' + this.queryParams.toString() } methodUpperCase = this.method.toUpperCase() - setBody = !(methodUpperCase === 'GET' || methodUpperCase === 'HEAD') + const setBody = !(methodUpperCase === 'GET' || methodUpperCase === 'HEAD') // Pass URL string to 1st arg for testing with MSW and node-fetch return (opt?.fetch || fetch)(url, { diff --git a/deno_dist/helper/ssg/ssg.ts b/deno_dist/helper/ssg/ssg.ts index 1366526d7..9fb1b5ab9 100644 --- a/deno_dist/helper/ssg/ssg.ts +++ b/deno_dist/helper/ssg/ssg.ts @@ -271,7 +271,7 @@ export interface ToSSGAdaptorInterface< * The API might be changed. */ export const toSSG: ToSSGInterface = async (app, fs, options) => { - let result: ToSSGResult | undefined = undefined + let result: ToSSGResult | undefined const getInfoPromises: Promise[] = [] const savePromises: Promise[] = [] try { diff --git a/deno_dist/middleware/serve-static/index.ts b/deno_dist/middleware/serve-static/index.ts index 5d43e4042..fb261865e 100644 --- a/deno_dist/middleware/serve-static/index.ts +++ b/deno_dist/middleware/serve-static/index.ts @@ -68,7 +68,7 @@ export const serveStatic = ( } if (content) { - let mimeType: string | undefined = undefined + let mimeType: string | undefined if (options.mimes) { mimeType = getMimeType(path, options.mimes) ?? getMimeType(path) } else { diff --git a/src/adapter/cloudflare-workers/utils.ts b/src/adapter/cloudflare-workers/utils.ts index df18a82ed..d7c87d58c 100644 --- a/src/adapter/cloudflare-workers/utils.ts +++ b/src/adapter/cloudflare-workers/utils.ts @@ -12,7 +12,7 @@ export const getContentFromKVAsset = async ( path: string, options?: KVAssetOptions ): Promise => { - let ASSET_MANIFEST: Record = {} + let ASSET_MANIFEST: Record if (options && options.manifest) { if (typeof options.manifest === 'string') { diff --git a/src/client/client.ts b/src/client/client.ts index 5c609ea61..68072ea99 100644 --- a/src/client/client.ts +++ b/src/client/client.ts @@ -84,7 +84,6 @@ class ClientRequestImpl { } let methodUpperCase = this.method.toUpperCase() - let setBody = !(methodUpperCase === 'GET' || methodUpperCase === 'HEAD') const headerValues: Record = { ...(args?.header ?? {}), @@ -117,7 +116,7 @@ class ClientRequestImpl { url = url + '?' + this.queryParams.toString() } methodUpperCase = this.method.toUpperCase() - setBody = !(methodUpperCase === 'GET' || methodUpperCase === 'HEAD') + const setBody = !(methodUpperCase === 'GET' || methodUpperCase === 'HEAD') // Pass URL string to 1st arg for testing with MSW and node-fetch return (opt?.fetch || fetch)(url, { diff --git a/src/helper/ssg/ssg.ts b/src/helper/ssg/ssg.ts index 51be31fa2..1071244ad 100644 --- a/src/helper/ssg/ssg.ts +++ b/src/helper/ssg/ssg.ts @@ -271,7 +271,7 @@ export interface ToSSGAdaptorInterface< * The API might be changed. */ export const toSSG: ToSSGInterface = async (app, fs, options) => { - let result: ToSSGResult | undefined = undefined + let result: ToSSGResult | undefined const getInfoPromises: Promise[] = [] const savePromises: Promise[] = [] try { diff --git a/src/middleware/serve-static/index.ts b/src/middleware/serve-static/index.ts index 930bb7d0c..3dafdc1be 100644 --- a/src/middleware/serve-static/index.ts +++ b/src/middleware/serve-static/index.ts @@ -68,7 +68,7 @@ export const serveStatic = ( } if (content) { - let mimeType: string | undefined = undefined + let mimeType: string | undefined if (options.mimes) { mimeType = getMimeType(path, options.mimes) ?? getMimeType(path) } else {