diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index d47a4147b..9f162a4f3 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -16,7 +16,7 @@ I want to write the code as I like. So, if you propose great ideas, but I do not appropriate them, the idea may not be accepted. Although, don't worry! -Hono is tested well, polished by the contributors, and used by many developers. And I'll try my best to make Hono cool, beautiful, and ultrafast. +Hono is tested well, polished by the contributors, and used by many developers. And I'll try my best to make Hono cool and hot, beautiful, and ultrafast. ## Installing dependencies diff --git a/runtime-tests/deno/middleware.test.tsx b/runtime-tests/deno/middleware.test.tsx index 9ca6f9bf4..711857183 100644 --- a/runtime-tests/deno/middleware.test.tsx +++ b/runtime-tests/deno/middleware.test.tsx @@ -13,7 +13,7 @@ Deno.test('Basic Auth Middleware', async () => { const app = new Hono() const username = 'hono' - const password = 'acoolproject' + const password = 'ahotproject' app.use( '/auth/*', @@ -29,7 +29,7 @@ Deno.test('Basic Auth Middleware', async () => { assertEquals(res.status, 401) assertEquals(await res.text(), 'Unauthorized') - const credential = 'aG9ubzphY29vbHByb2plY3Q=' + const credential = 'aG9ubzphaG90cHJvamVjdA==' const req = new Request('http://localhost/auth/a') req.headers.set('Authorization', `Basic ${credential}`) diff --git a/runtime-tests/lambda-edge/index.test.ts b/runtime-tests/lambda-edge/index.test.ts index e97558ec5..fa8860c0b 100644 --- a/runtime-tests/lambda-edge/index.test.ts +++ b/runtime-tests/lambda-edge/index.test.ts @@ -1,4 +1,3 @@ -/* eslint-disable quotes */ import type { Callback, CloudFrontConfig, diff --git a/src/adapter/cloudflare-pages/handler.test.ts b/src/adapter/cloudflare-pages/handler.test.ts index 747d11e07..4c74fe54e 100644 --- a/src/adapter/cloudflare-pages/handler.test.ts +++ b/src/adapter/cloudflare-pages/handler.test.ts @@ -18,7 +18,7 @@ function createEventContext( env: { ...context.env, ASSETS: { fetch: vi.fn(), ...context.env?.ASSETS }, - TOKEN: context.env?.TOKEN ?? 'HONOISCOOL', + TOKEN: context.env?.TOKEN ?? 'HONOISHOT', }, functionPath: '_worker.js', next: vi.fn(), @@ -35,7 +35,7 @@ describe('Adapter for Cloudflare Pages', () => { const request = new Request('http://localhost/api/foo') const env = { ASSETS: { fetch }, - TOKEN: 'HONOISCOOL', + TOKEN: 'HONOISHOT', } const waitUntil = vi.fn() const passThroughOnException = vi.fn() @@ -59,7 +59,7 @@ describe('Adapter for Cloudflare Pages', () => { ) expect(res.status).toBe(200) expect(await res.json()).toEqual({ - TOKEN: 'HONOISCOOL', + TOKEN: 'HONOISHOT', requestURL: 'http://localhost/api/foo', }) }) @@ -250,7 +250,7 @@ describe('serveStatic()', () => { const request = new Request('http://localhost/foo.png') const env = { ASSETS: { fetch: assetsFetch }, - TOKEN: 'HONOISCOOL', + TOKEN: 'HONOISHOT', } const eventContext = createEventContext({ request, env }) @@ -269,7 +269,7 @@ describe('serveStatic()', () => { const request = new Request('http://localhost/foo.png') const env = { ASSETS: { fetch: assetsFetch }, - TOKEN: 'HONOISCOOL', + TOKEN: 'HONOISHOT', } const eventContext = createEventContext({ request, env }) diff --git a/src/adapter/service-worker/handler.test.ts b/src/adapter/service-worker/handler.test.ts index f9f2bb673..336f1c8b6 100644 --- a/src/adapter/service-worker/handler.test.ts +++ b/src/adapter/service-worker/handler.test.ts @@ -10,7 +10,6 @@ beforeAll(() => { function fetch(this: undefined | typeof globalThis, arg0: string | Request) { if (this !== globalThis) { const error = new Error( - // eslint-disable-next-line quotes "Failed to execute 'fetch' on 'WorkerGlobalScope': Illegal invocation" ) error.name = 'TypeError' diff --git a/src/context.ts b/src/context.ts index 9c19eff31..ce7220074 100644 --- a/src/context.ts +++ b/src/context.ts @@ -575,7 +575,7 @@ export class Context< * @example * ```ts * app.use('*', async (c, next) => { - * c.set('message', 'Hono is cool!!') + * c.set('message', 'Hono is hot!!') * await next() * }) * ``` diff --git a/src/helper/css/common.case.test.tsx b/src/helper/css/common.case.test.tsx index 112acd190..502fac430 100644 --- a/src/helper/css/common.case.test.tsx +++ b/src/helper/css/common.case.test.tsx @@ -1,4 +1,3 @@ -/* eslint-disable quotes */ /** @jsxImportSource ../../jsx */ import type { Style as StyleComponent, diff --git a/src/helper/css/common.ts b/src/helper/css/common.ts index aff38a280..12f543376 100644 --- a/src/helper/css/common.ts +++ b/src/helper/css/common.ts @@ -51,7 +51,7 @@ const toHash = (str: string): string => { const cssStringReStr: string = [ '"(?:(?:\\\\[\\s\\S]|[^"\\\\])*)"', // double quoted string - // eslint-disable-next-line quotes + "'(?:(?:\\\\[\\s\\S]|[^'\\\\])*)'", // single quoted string ].join('|') const minifyCssRe: RegExp = new RegExp( diff --git a/src/helper/html/index.test.ts b/src/helper/html/index.test.ts index ab4199fd7..5df267972 100644 --- a/src/helper/html/index.test.ts +++ b/src/helper/html/index.test.ts @@ -4,7 +4,7 @@ import { html, raw } from '.' describe('Tagged Template Literals', () => { it('Should escape special characters', () => { const name = 'John "Johnny" Smith' - // eslint-disable-next-line quotes + expect(html`
I'm ${name}.
`.toString()).toBe("I'm John "Johnny" Smith.
") }) @@ -35,7 +35,7 @@ describe('Tagged Template Literals', () => { const name = Promise.resolve('John "Johnny" Smith') const res = html`I'm ${name}.
` expect(res).toBeInstanceOf(Promise) - // eslint-disable-next-line quotes + expect((await res).toString()).toBe("I'm John "Johnny" Smith.
") }) @@ -59,10 +59,9 @@ describe('Tagged Template Literals', () => { ]) const res = html`I'm ${name}.
` expect(res).toBeInstanceOf(Promise) - // eslint-disable-next-line quotes + expect((await res).toString()).toBe("I'm Hono.
") expect(await resolveCallback(await res, HtmlEscapedCallbackPhase.Stringify, false, {})).toBe( - // eslint-disable-next-line quotes "I'm Hono!.
" ) }) @@ -73,7 +72,6 @@ describe('raw', () => { it('Should be marked as escaped.', () => { const name = 'John "Johnny" Smith' expect(html`I'm ${raw(name)}.
`.toString()).toBe( - // eslint-disable-next-line quotes "I'm John "Johnny" Smith.
" ) }) diff --git a/src/jsx/dom/css.ts b/src/jsx/dom/css.ts index 5a3b34403..5e073f267 100644 --- a/src/jsx/dom/css.ts +++ b/src/jsx/dom/css.ts @@ -27,7 +27,7 @@ const splitRule = (rule: string): string[] => { const char = rule[i] // consume quote - // eslint-disable-next-line quotes + if (char === "'" || char === '"') { const quote = char i++ @@ -44,7 +44,6 @@ const splitRule = (rule: string): string[] => { } // comments are removed from the rule in advance - if (char === '{') { depth++ continue diff --git a/src/middleware/basic-auth/index.ts b/src/middleware/basic-auth/index.ts index 45d5f6c65..b27b38c3f 100644 --- a/src/middleware/basic-auth/index.ts +++ b/src/middleware/basic-auth/index.ts @@ -49,7 +49,7 @@ type BasicAuthOptions = * '/auth/*', * basicAuth({ * username: 'hono', - * password: 'acoolproject', + * password: 'ahotproject', * }) * ) * diff --git a/src/middleware/bearer-auth/index.ts b/src/middleware/bearer-auth/index.ts index 0388e5e65..1b5ab9b18 100644 --- a/src/middleware/bearer-auth/index.ts +++ b/src/middleware/bearer-auth/index.ts @@ -60,7 +60,7 @@ type BearerAuthOptions = * ```ts * const app = new Hono() * - * const token = 'honoiscool' + * const token = 'honoishot' * * app.use('/api/*', bearerAuth({ token })) * diff --git a/src/middleware/body-limit/index.test.ts b/src/middleware/body-limit/index.test.ts index 60fae554b..a923005f2 100644 --- a/src/middleware/body-limit/index.test.ts +++ b/src/middleware/body-limit/index.test.ts @@ -20,12 +20,12 @@ const buildRequestInit = (init: RequestInit = {}): RequestInit & { duplex: 'half describe('Body Limit Middleware', () => { let app: Hono - const exampleText = 'hono is so cool' // 15byte - const exampleText2 = 'hono is so cool and cute' // 24byte + const exampleText = 'hono is so hot' // 14byte + const exampleText2 = 'hono is so hot and cute' // 23byte beforeEach(() => { app = new Hono() - app.use('*', bodyLimit({ maxSize: 15 })) + app.use('*', bodyLimit({ maxSize: 14 })) app.get('/', (c) => c.text('index')) app.post('/body-limit-15byte', async (c) => { return c.text(await c.req.raw.text()) diff --git a/src/middleware/context-storage/index.test.ts b/src/middleware/context-storage/index.test.ts index d9713b975..432d4ef6e 100644 --- a/src/middleware/context-storage/index.test.ts +++ b/src/middleware/context-storage/index.test.ts @@ -12,7 +12,7 @@ describe('Context Storage Middleware', () => { app.use(contextStorage()) app.use(async (c, next) => { - c.set('message', 'Hono is cool!!') + c.set('message', 'Hono is hot!!') await next() }) app.get('/', (c) => { @@ -25,6 +25,6 @@ describe('Context Storage Middleware', () => { it('Should get context', async () => { const res = await app.request('/') - expect(await res.text()).toBe('Hono is cool!!') + expect(await res.text()).toBe('Hono is hot!!') }) }) diff --git a/src/middleware/context-storage/index.ts b/src/middleware/context-storage/index.ts index 4447303c5..a7b69afe0 100644 --- a/src/middleware/context-storage/index.ts +++ b/src/middleware/context-storage/index.ts @@ -29,7 +29,7 @@ const asyncLocalStorage = new AsyncLocalStorage