Skip to content
Myr

chore: let oxfmt sort imports instead of eslint (#5442)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Yusuke Wada · committed by GitHub · parent 57ba76a · Browse files · 60 files+89 added−87 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

60 files+89 added−87 removed

  • tests:+73 added−75 removed
  • other:+16 added−12 removed

60 files+89 added−87 removed

modified:benchmarks/jsx/src/react-jsx/benchmark.ts-1 removed
modified:benchmarks/jsx/src/benchmark.ts-1 removed
modified:build/build.ts+2 added-2 removed
modified:build/remove-private-fields.ts+1 added-1 removed
1import { readFile, writeFile } from 'fs/promises'2import type { PropertyDefinition, ParseResult } from 'oxc-parser'3import { parseSync, Visitor } from 'oxc-parser'3import { readFile, writeFile } from 'fs/promises'45export async function removePrivateFields(files: string[]) {6 const start = performance.now()7 const parsed = await Promise.all(
50 unmodified lines
modified:perf-measures/bundle-check/scripts/check-bundle-size.ts+1 added-1 removed
1import * as esbuild from 'esbuild'1import * as fs from 'node:fs'2import * as os from 'os'3import * as path from 'path'4import * as esbuild from 'esbuild'56async function main() {7 const tempDir = os.tmpdir()8 const tempFilePath = path.join(tempDir, 'bundle.tmp.js')
44 unmodified lines
modified:runtime-tests/bun/index.test.tsx+1 added-1 removed
1import { afterAll, afterEach, beforeEach, describe, expect, it, vi } from 'vitest'1import fs from 'fs/promises'2import path from 'path'3import { afterAll, afterEach, beforeEach, describe, expect, it, vi } from 'vitest'4import { stream, streamSSE } from '../..//src/helper/streaming'5import { serveStatic, toSSG } from '../../src/adapter/bun'6import { createBunWebSocket } from '../../src/adapter/bun/websocket'7import type { BunWebSocketData } from '../../src/adapter/bun/websocket'
452 unmodified lines
modified:runtime-tests/deno/hono.test.ts-1 removed
1import { assertEquals } from '@std/assert'22import { Context } from '../../src/context.ts'3import { env, getRuntimeKey } from '../../src/helper/adapter/index.ts'4import { Hono } from '../../src/hono.ts'5
29 unmodified lines
modified:runtime-tests/lambda/stream-mock.ts+1 added-1 removed
1import { vi } from 'vitest'1import { Writable } from 'node:stream'2import { vi } from 'vitest'3import type {4 APIGatewayProxyEvent,5 APIGatewayProxyEventV2,6} from '../../src/adapter/aws-lambda/handler'
38 unmodified lines
modified:runtime-tests/node/index.test.ts+1 added-1 removed
1import { createAdaptorServer, serve } from '@hono/node-server'1import { once } from 'node:events'2import type { Server } from 'node:http'3import type { AddressInfo } from 'node:net'4import { createAdaptorServer, serve } from '@hono/node-server'5import { Hono } from '../../src'6import { Context } from '../../src/context'7import { env, getRuntimeKey } from '../../src/helper/adapter'8import { stream, streamSSE } from '../../src/helper/streaming'
288 unmodified lines
modified:src/adapter/cloudflare-workers/websocket.test.ts+1 added-1 removed
1import { upgradeWebSocket } from '.'2import { Hono } from '../..'3import { Context } from '../../context'3import { upgradeWebSocket } from '.'45describe('upgradeWebSocket middleware', () => {6 const server = new EventTarget()7
155 unmodified lines
modified:src/adapter/lambda-edge/handler.ts-1 removed
1import crypto from 'node:crypto'2import type { Hono } from '../../hono'33import { decodeBase64, encodeBase64 } from '../../utils/encode'45// eslint-disable-next-line @typescript-eslint/ban-ts-comment6// @ts-ignore
233 unmodified lines
modified:src/client/types.test.ts+1 added-1 removed
1/* eslint-disable @typescript-eslint/no-unused-vars */2import { expectTypeOf } from 'vitest'3import { hc } from '.'4import { Hono } from '..'5import { upgradeWebSocket } from '../adapter/deno/websocket'6import type { TypedURL } from './types'6import { hc } from '.'78describe('WebSockets', () => {9 const app = new Hono()10 .get(
136 unmodified lines
modified:src/helper/adapter/index.test.ts+1 added-1 removed
1import { Hono } from '../../hono'1import { env, getRuntimeKey } from '.'2import { Hono } from '../../hono'34describe('getRuntimeKey', () => {5 it('Should return the current runtime key', () => {6 // Now, using the `bun run test` command.
49 unmodified lines
modified:src/helper/cookie/index.test.ts+1 added-1 removed
1import { Hono } from '../../hono'1import {2 deleteCookie,3 getCookie,4 getSignedCookie,
1 unmodified line
6 setSignedCookie,7 generateCookie,8 generateSignedCookie,9} from '.'10import { Hono } from '../../hono'1112describe('Cookie Middleware', () => {13 describe('Parse cookie', () => {14 const apps: Record<string, Hono> = {}
496 unmodified lines
modified:src/helper/dev/index.test.ts+1 added-1 removed
1import { getRouterName, inspectRoutes, showRoutes } from '.'2import { Hono } from '../../hono'3import { RegExpRouter } from '../../router/reg-exp-router'4import type { Handler, MiddlewareHandler } from '../../types'4import { getRouterName, inspectRoutes, showRoutes } from '.'56const namedMiddleware: MiddlewareHandler = (_, next) => next()7const namedHandler: Handler = (c) => c.text('hi')8const app = new Hono()
173 unmodified lines
modified:src/helper/html/index.test.ts+1 added-1 removed
1import { HtmlEscapedCallbackPhase, resolveCallback } from '../../utils/html'1import { html, raw } from '.'2import { HtmlEscapedCallbackPhase, resolveCallback } from '../../utils/html'34describe('Tagged Template Literals', () => {5 it('Should escape special characters', () => {6 const name = 'John "Johnny" Smith'
72 unmodified lines
modified:src/helper/proxy/index.test.ts+1 added-1 removed
1import { Hono } from '../../hono'1import { proxy } from '.'2import { Hono } from '../../hono'34describe('Proxy Middleware', () => {5 describe('proxy', () => {6 beforeEach(() => {
350 unmodified lines
modified:src/helper/route/index.test.ts+1 added-1 removed
1import { matchedRoutes, routePath, baseRoutePath, basePath } from '.'2import { Context } from '../../context'3import { Hono } from '../../hono'3import { matchedRoutes, routePath, baseRoutePath, basePath } from '.'45const defaultContextOptions = {6 executionCtx: {7 waitUntil: () => {},
233 unmodified lines
modified:src/helper/streaming/sse.test.tsx+1 added-1 removed
1import { streamSSE } from '.'2/** @jsxImportSource ../../jsx */3import { Context } from '../../context'4import { ErrorBoundary, Suspense } from '../../jsx'4import { streamSSE } from '.'56describe('SSE Streaming helper', () => {7 const req = new Request('http://localhost/')8 let c: Context
549 unmodified lines
modified:src/helper/streaming/stream.test.ts+1 added-1 removed
1import { Context } from '../../context'1import { stream } from '.'2import { Context } from '../../context'34describe('Basic Streaming Helper', () => {5 const req = new Request('http://localhost/')6 let c: Context
122 unmodified lines
modified:src/helper/streaming/text.test.ts+1 added-1 removed
1import { Context } from '../../context'1import { streamText } from '.'2import { Context } from '../../context'34describe('Text Streaming Helper', () => {5 const req = new Request('http://localhost/')6 let c: Context
28 unmodified lines
modified:src/helper/testing/index.test.ts+1 added-1 removed
1import { Hono } from '../../hono'1import { testClient } from '.'2import { Hono } from '../../hono'34describe('hono testClient', () => {5 it('Should return the correct search result', async () => {6 const app = new Hono().get('/search', (c) => c.json({ hello: 'world' }))
36 unmodified lines
modified:src/helper/websocket/index.test.ts+1 added-1 removed
1import { Context } from '../../context'1import type { WSContextInit } from '.'2import { WSContext, createWSMessageEvent, defineWebSocketHelper } from '.'3import { Context } from '../../context'45describe('`createWSMessageEvent`', () => {6 it('Should `createWSMessageEvent` is working for string', () => {7 const randomString = Math.random().toString()
117 unmodified lines
modified:src/jsx/dom/hooks/index.test.tsx+1 added-1 removed
1/** @jsxImportSource ../../ */2import { JSDOM } from 'jsdom'3import { render, useCallback, useState } from '..'3import { useActionState, useFormStatus, useOptimistic } from '.'4import { render, useCallback, useState } from '..'56describe('Hooks', () => {7 beforeAll(() => {8 global.requestAnimationFrame = (cb) => setTimeout(cb)
164 unmodified lines
modified:src/jsx/dom/client.test.tsx+1 added-1 removed
1/** @jsxImportSource ../ */2import { JSDOM } from 'jsdom'3import DefaultExport, { createRoot, hydrateRoot } from './client'3import { useEffect } from '.'4import DefaultExport, { createRoot, hydrateRoot } from './client'56describe('createRoot', () => {7 beforeAll(() => {8 global.requestAnimationFrame = (cb) => setTimeout(cb)
120 unmodified lines
modified:src/jsx/dom/components.test.tsx+1 added-1 removed
1/** @jsxImportSource ../ */2import { JSDOM } from 'jsdom'3import { ErrorBoundary as ErrorBoundaryDom, Suspense as SuspenseDom, render } from '.' // for dom4import { ErrorBoundary as ErrorBoundaryCommon, Suspense as SuspenseCommon } from '..' // for common5// run tests by old style jsx default6// hono/jsx/jsx-runtime and hono/jsx/dom/jsx-runtime are tested in their respective settings7import { use, useState } from '../hooks'7import { ErrorBoundary as ErrorBoundaryDom, Suspense as SuspenseDom, render } from '.' // for dom89runner('Common', SuspenseCommon, ErrorBoundaryCommon)10runner('DOM', SuspenseDom, ErrorBoundaryDom)11
319 unmodified lines
modified:src/jsx/dom/context.test.tsx+3 added-3 removed
1/** @jsxImportSource ../ */2import { JSDOM } from 'jsdom'3// run tests by old style jsx default4// hono/jsx/jsx-runtime and hono/jsx/dom/jsx-runtime are tested in their respective settings5import { createContext as createContextDom, render, useContext as useContextDom, useState } from '.' // for dom6import {7 Suspense,8 createContext as createContextCommon,9 use,10 useContext as useContextCommon,11} from '..' // for common9// run tests by old style jsx default10// hono/jsx/jsx-runtime and hono/jsx/dom/jsx-runtime are tested in their respective settings11import { createContext as createContextDom, render, useContext as useContextDom, useState } from '.' // for dom1213runner('Common', createContextCommon, useContextCommon)14runner('DOM', createContextDom, useContextDom)15
169 unmodified lines
modified:src/jsx/dom/css.test.tsx+1 added-2 removed
1/** @jsxImportSource ../ */2import { JSDOM } from 'jsdom'3// run tests by old style jsx default4// hono/jsx/jsx-runtime and hono/jsx/dom/jsx-runtime are tested in their respective settings55import { render } from '.'6import type { JSXNode } from '..'7import { Style, createCssContext, css, rawCssString } from '../../helper/css'8import { minify } from '../../helper/css/common'9import { renderTest } from '../../helper/css/common.case.test'10import { render } from '.'1011describe('Style and css for jsx/dom', () => {12 beforeAll(() => {13 global.requestAnimationFrame = (cb) => setTimeout(cb)
136 unmodified lines
modified:src/jsx/dom/index.test.tsx+13 added-13 removed
1/** @jsxImportSource ../ */2import { JSDOM } from 'jsdom'3import DefaultExport, {4 cloneElement,5 cloneElement as cloneElementForDom,6 createElement as createElementForDom,7 createContext,8 useContext,9 createPortal,10 flushSync,11 isValidElement,12 memo,13 render,14 version,15} from '.'16import type { Child, FC } from '..'17// run tests by old style jsx default18// hono/jsx/jsx-runtime and hono/jsx/dom/jsx-runtime are tested in their respective settings19import { createElement, jsx } from '..'
9 unmodified lines
29 useState,30} from '../hooks'31import type { NodeObject } from './render'32import { build, buildNode } from './render'20import DefaultExport, {21 cloneElement,22 cloneElement as cloneElementForDom,23 createElement as createElementForDom,24 createContext,25 useContext,26 createPortal,27 flushSync,28 isValidElement,29 memo,30 render,31 version,32} from '.'3334describe('Common', () => {35 ;[createElement, createElementForDom].forEach((createElement) => {36 describe('createElement', () => {
3645 unmodified lines
modified:src/jsx/hooks/dom.test.tsx+3 added-3 removed
1/** @jsxImportSource ../ */2import { JSDOM } from 'jsdom'3// run tests by old style jsx default4// hono/jsx/jsx-runtime and hono/jsx/dom/jsx-runtime are tested in their respective settings5import { ErrorBoundary, Suspense, render } from '../dom'3import {4 createRef,5 forwardRef,6 startTransition,
9 unmodified lines
16 useSyncExternalStore,17 useTransition,18 useViewTransition,19} from '.'20// run tests by old style jsx default21// hono/jsx/jsx-runtime and hono/jsx/dom/jsx-runtime are tested in their respective settings22import { ErrorBoundary, Suspense, render } from '../dom'2324describe('Hooks', () => {25 beforeAll(() => {26 global.requestAnimationFrame = (cb) => setTimeout(cb)
833 unmodified lines
modified:src/jsx/children.test.ts+1 added-1 removed
1import { Children } from './children'1import { createElement } from '.'2import { Children } from './children'34describe('map', () => {5 it('should map children', () => {6 const element = createElement('div', null, 1, 2, 3)
46 unmodified lines
modified:src/jsx/components.ts+1 added-1 removed
1import { raw } from '../helper/html'2import type { HtmlEscapedCallback, HtmlEscapedString } from '../utils/html'3import { HtmlEscapedCallbackPhase, resolveCallback } from '../utils/html'4import type { Child, FC, PropsWithChildren } from './'5import { jsx, Fragment, isUntrustedObject, renderChildren, renderUntrustedObject } from './base'6import { DOM_RENDERER } from './constants'7import { captureRenderContext, useContext } from './context'8import { ErrorBoundary as ErrorBoundaryDomRenderer } from './dom/components'9import type { HasRenderToDom } from './dom/render'10import { StreamingContext } from './streaming'10import type { Child, FC, PropsWithChildren } from './'1112let errorBoundaryCounter = 01314export const childrenToString = async (children: Child[]): Promise<HtmlEscapedString[]> => {
243 unmodified lines
modified:src/jsx/context.ts+1 added-1 removed
1import { raw } from '../helper/html'2import type { HtmlEscapedString } from '../utils/html'3import type { FC, PropsWithChildren } from './'4import { isUntrustedObject, JSXFragmentNode, renderChildren, renderUntrustedObject } from './base'5import { DOM_RENDERER } from './constants'6import { createContextProviderFunction } from './dom/context'6import type { FC, PropsWithChildren } from './'78export interface Context<T> extends FC<PropsWithChildren<{ value: T }>> {9 values: T[]10 Provider: FC<PropsWithChildren<{ value: T }>>
256 unmodified lines
modified:src/jsx/index.test.tsx+7 added-7 removed
1/** @jsxImportSource ./ */2/* eslint-disable @typescript-eslint/no-explicit-any */3import { html, raw } from '../helper/html'4import { Hono } from '../hono'5import { DOM_MEMO } from './constants'6import { captureRenderContext } from './context'7import { Suspense, renderToReadableStream } from './streaming'1import DefaultExport, {2 ErrorBoundary,3 Fragment,4 StrictMode,
4 unmodified lines
9 useContext,10 version,11} from '.'12import type { Context, FC, PropsWithChildren } from '.'13/** @jsxImportSource ./ */14/* eslint-disable @typescript-eslint/no-explicit-any */15import { html, raw } from '../helper/html'16import { Hono } from '../hono'17import { DOM_MEMO } from './constants'18import { captureRenderContext } from './context'19import { Suspense, renderToReadableStream } from './streaming'2021interface SiteData {22 title: string23 children?: any
1722 unmodified lines
modified:src/jsx/streaming.ts+1 added-1 removed
4 unmodified lines
56import { raw } from '../helper/html'7import { HtmlEscapedCallbackPhase, resolveCallback } from '../utils/html'8import type { HtmlEscapedString } from '../utils/html'9import type { Child, FC, PropsWithChildren, Context as JSXContext } from './'10import { isUntrustedObject, JSXNode, renderChildren, renderUntrustedObject } from './base'11import { childrenToString } from './components'12import { DOM_RENDERER, DOM_STASH } from './constants'13import { captureRenderContext, createContext, useContext } from './context'14import { Suspense as SuspenseDomRenderer } from './dom/components'15import { buildDataStack } from './dom/render'16import type { HasRenderToDom, NodeObject } from './dom/render'16import type { Child, FC, PropsWithChildren, Context as JSXContext } from './'1718/**19 * Used to specify nonce for scripts generated by `Suspense` and `ErrorBoundary`.20 *
211 unmodified lines
modified:src/middleware/basic-auth/index.test.ts+1 added-1 removed
1import { createHash } from 'crypto'2import { Hono } from '../../hono'2import { basicAuth } from '.'3import { Hono } from '../../hono'45describe('Basic Auth by Middleware', () => {6 let handlerExecuted: boolean7
427 unmodified lines
modified:src/middleware/bearer-auth/index.test.ts+1 added-1 removed
1import { expectTypeOf } from 'vitest'2import { bearerAuth } from '.'3import { Hono } from '../../hono'4import type { Context, MiddlewareHandler } from '../../index'4import { bearerAuth } from '.'56describe('Bearer Auth by Middleware', () => {7 let app: Hono8 let handlerExecuted: boolean
1010 unmodified lines
modified:src/middleware/body-limit/index.test.ts+1 added-1 removed
1import { Hono } from '../../hono'1import { bodyLimit } from '.'2import { Hono } from '../../hono'34const buildRequestInit = (init: RequestInit = {}): RequestInit & { duplex: 'half' } => {5 const headers: Record<string, string> = {6 'Content-Type': 'text/plain',
267 unmodified lines
modified:src/middleware/cache/index.test.ts+1 added-1 removed
1import { vi } from 'vitest'2import { cache } from '.'3import type { ExecutionContext } from '../../context'4import { Hono } from '../../hono'4import { cache } from '.'56// Mock7type StoreMap = Map<string | Request, Response>8
1203 unmodified lines
modified:src/middleware/combine/index.test.ts+1 added-1 removed
1import { every, except, some } from '.'2import { Hono } from '../../hono'3import type { MiddlewareHandler } from '../../types'3import { every, except, some } from '.'45const nextMiddleware: MiddlewareHandler = async (_, next) => await next()67describe('some', () => {
331 unmodified lines
modified:src/middleware/compress/index.test.ts+1 added-1 removed
1import { compress } from '.'2import { stream, streamSSE } from '../../helper/streaming'3import { Hono } from '../../hono'3import { compress } from '.'45describe('Compress Middleware', () => {6 const app = new Hono()7
528 unmodified lines
modified:src/middleware/context-storage/index.test.ts+1 added-1 removed
1import { Hono } from '../../hono'1import { contextStorage, getContext, tryGetContext } from '.'2import { Hono } from '../../hono'34describe('Context Storage Middleware', () => {5 type Env = {6 Variables: {
37 unmodified lines
modified:src/middleware/etag/index.test.ts+1 added-1 removed
1import { Hono } from '../../hono'1import { RETAINED_304_HEADERS, etag } from '.'2import { Hono } from '../../hono'34const createPatternedBody = (length: number) => {5 const body = new Uint8Array(length)6 for (let i = 0; i < body.byteLength; i++) {
495 unmodified lines
modified:src/middleware/ip-restriction/index.test.ts+2 added-2 removed
1import { ipRestriction } from '.'2import type { IPRestrictionRule } from '.'3import { Context } from '../../context'4import type { AddressType, GetConnInfo } from '../../helper/conninfo'5import { Hono } from '../../hono'4import { ipRestriction } from '.'5import type { IPRestrictionRule } from '.'67describe('ipRestriction middleware', () => {8 it('Should restrict', async () => {9 const getConnInfo: GetConnInfo = (c) => {
208 unmodified lines
modified:src/middleware/jsx-renderer/index.test.tsx+1 added-1 removed
1/** @jsxImportSource ../../jsx */2import { expectTypeOf } from 'vitest'3import { jsxRenderer, useRequestContext } from '.'4import { html } from '../../helper/html'5import { Hono } from '../../hono'6import type { FC } from '../../jsx'7import { Suspense } from '../../jsx/streaming'7import { jsxRenderer, useRequestContext } from '.'89const RequestUrl: FC = () => {10 const c = useRequestContext()11 return html`${c.req.url}`
519 unmodified lines
modified:src/middleware/jwk/index.test.ts+1 added-1 removed
1import { HttpResponse, http } from 'msw'2import { setupServer } from 'msw/node'3import { jwk } from '.'4import { setSignedCookie } from '../../helper/cookie'5import { Hono } from '../../hono'6import { HTTPException } from '../../http-exception'7import { encodeBase64Url } from '../../utils/encode'
3 unmodified lines
11import { verifyWithJwks } from '../../utils/jwt/jwt'12import type { JWTPayload } from '../../utils/jwt/types'13import { utf8Encoder } from '../../utils/jwt/utf8'14import * as test_keys from './keys.test.json'14import { jwk } from '.'1516const verify_keys = test_keys.public_keys1718describe('JWK', () => {
1117 unmodified lines
modified:src/middleware/jwt/index.test.ts+2 added-2 removed
1import { describe, expectTypeOf } from 'vitest'2import { Hono } from '../../hono'3import { HTTPException } from '../../http-exception'2import { jwt } from '.'3import type { JwtVariables } from '.'4import { Hono } from '../../hono'5import { HTTPException } from '../../http-exception'67describe('JWT', () => {8 describe('Credentials in header', () => {9 let handlerExecuted: boolean
793 unmodified lines
modified:src/middleware/language/index.test.ts+1 added-1 removed
1import { languageDetector } from '.'2import { Hono } from '../../hono'3import { DEFAULT_OPTIONS, detectors, normalizeLanguage } from './language'3import { languageDetector } from '.'45describe('languageDetector', () => {6 const createTestApp = (options = {}) => {7 const app = new Hono()
545 unmodified lines
modified:src/middleware/logger/index.test.ts+1 added-1 removed
1import { Hono } from '../../hono'1import { logger } from '.'2import { Hono } from '../../hono'34describe('Logger by Middleware', () => {5 let app: Hono6 let log: string
198 unmodified lines
modified:src/middleware/method-not-allowed/index.test.ts+1 added-1 removed
1import { Hono } from '../../hono'1import { methodNotAllowed } from '.'2import { Hono } from '../../hono'34describe('Method Not Allowed Middleware', () => {5 it('infers the environment from the app', () => {6 const app = new Hono<{ Variables: { requestId: string } }>()
286 unmodified lines
modified:src/middleware/powered-by/index.test.ts+1 added-1 removed
1import { Hono } from '../../hono'1import { poweredBy } from '.'2import { Hono } from '../../hono'34describe('Powered by Middleware', () => {5 const app = new Hono()6
31 unmodified lines
modified:src/middleware/pretty-json/index.test.ts+1 added-1 removed
1import { Hono } from '../../hono'1import { prettyJSON } from '.'2import { Hono } from '../../hono'34describe('JSON pretty by Middleware', () => {5 it('Should return pretty JSON output', async () => {6 const app = new Hono()
212 unmodified lines
modified:src/middleware/request-id/index.test.ts+1 added-1 removed
1import { requestId } from '.'2import type { Context } from '../../context'3import { Hono } from '../../hono'3import { requestId } from '.'45const regexUUIDv4 = /([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})/67describe('Request ID Middleware', () => {
161 unmodified lines
modified:src/middleware/secure-headers/index.test.ts+2 added-2 removed
1import { Hono } from '../../hono'2import { poweredBy } from '../powered-by'1import { NONCE, secureHeaders } from '.'2import type { ContentSecurityPolicyOptionHandler } from '.'3import { Hono } from '../../hono'4import { poweredBy } from '../powered-by'56declare module '../..' {7 interface ContextVariableMap {8 ['test-scriptSrc-nonce']?: string
663 unmodified lines
modified:src/middleware/serve-static/index.test.ts+1 added-1 removed
1import { Hono } from '../../hono'1import { serveStatic as baseServeStatic } from '.'2import { Hono } from '../../hono'34describe('Serve Static Middleware', () => {5 const app = new Hono()6 const getContent = vi.fn(async (path) => {
315 unmodified lines
modified:src/middleware/timeout/index.test.ts+2 added-2 removed
1import type { HTTPExceptionFunction } from '.'2import { timeout } from '.'3import type { Context } from '../../context'4import { Hono } from '../../hono'5import { HTTPException } from '../../http-exception'4import type { HTTPExceptionFunction } from '.'5import { timeout } from '.'67describe('Timeout API', () => {8 const app = new Hono()9
61 unmodified lines
modified:src/middleware/timing/index.test.ts+1 added-1 removed
1import { Hono } from '../../hono'1import { endTime, setMetric, startTime, timing, wrapTime } from '.'2import { Hono } from '../../hono'34describe('Server-Timing API', () => {5 const app = new Hono()6
304 unmodified lines
modified:src/middleware/trailing-slash/index.test.ts+1 added-1 removed
1import { Hono } from '../../hono'1import { appendTrailingSlash, trimTrailingSlash } from '.'2import { Hono } from '../../hono'34describe('Resolve trailing slash', () => {5 describe('trimTrailingSlash middleware', () => {6 const app = new Hono({ strict: true })
375 unmodified lines
modified:.oxfmtrc.json+3 added
4 unmodified lines
5 "semi": false,6 "singleQuote": true,7 "jsxSingleQuote": true,8 "endOfLine": "lf",9 "sortImports": {10 "newlinesBetween": false11 },12 "sortPackageJson": false,13 "ignorePatterns": [14 "dist/",15 "coverage/",
4 unmodified lines
modified:eslint.config.mjs+5 added-1 removed
75 unmodified lines
76 linterOptions: {77 reportUnusedDisableDirectives: 'error',78 reportUnusedInlineConfigs: 'error',79 },80 rules: typeCheckedRules,80 rules: {81 ...typeCheckedRules,82 // Import order is handled by oxfmt's `sortImports`.83 'import-x/order': 'off',84 },85})