Skip to content

Commit 2f97ead

Browse files
committed
fix: Correctly sort type only imports.
1 parent 12b2e15 commit 2f97ead

File tree

6 files changed

+19
-17
lines changed

6 files changed

+19
-17
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,16 @@
4141
"@fastify/static": "^8.3.0",
4242
"fastify-plugin": "^5.1.0",
4343
"js-yaml": "^4.1.1",
44-
"swagger-ui-dist": "^5.30.2"
44+
"swagger-ui-dist": "^5.30.3"
4545
},
4646
"devDependencies": {
47-
"@cowtech/eslint-config": "^11.0.0",
48-
"@cowtech/typescript-config": "^0.2.2",
47+
"@cowtech/eslint-config": "^11.1.3",
48+
"@cowtech/typescript-config": "^0.2.5",
4949
"@types/js-yaml": "^4.0.9",
5050
"@types/node": "^24.10.1",
5151
"@types/swagger-ui-dist": "^3.30.6",
5252
"c8": "^10.1.3",
53-
"cleaner-spec-reporter": "^1.0.0",
53+
"cleaner-spec-reporter": "^1.0.3",
5454
"eslint": "^9.39.1",
5555
"fastify": "^5.6.2",
5656
"prettier": "^3.6.2",

src/index.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
import {
2-
type FastifyError,
3-
type FastifyInstance,
4-
type FastifyPluginOptions,
5-
type FastifyReply,
6-
type FastifyRequest,
7-
type RouteOptions
1+
import type {
2+
FastifyError,
3+
FastifyInstance,
4+
FastifyPluginOptions,
5+
FastifyReply,
6+
FastifyRequest,
7+
RouteOptions
88
} from 'fastify'
9+
import type { Schema } from './spec.ts'
910
import fastifyPlugin from 'fastify-plugin'
1011
import { dump } from 'js-yaml'
11-
import { buildSpec, type Schema } from './spec.ts'
12+
import { buildSpec } from './spec.ts'
1213
import { addUI } from './ui.ts'
1314

1415
export const plugin = fastifyPlugin(

src/spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type FastifyInstance, type FastifySchema, type RouteOptions } from 'fastify'
1+
import type { FastifyInstance, FastifySchema, RouteOptions } from 'fastify'
22

33
type RouteConfig = Record<string, any>
44

src/ui.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import fastifyStatic from '@fastify/static'
2-
import { type FastifyInstance, type FastifyReply, type FastifyRequest } from 'fastify'
1+
import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify'
32
import { readFileSync } from 'node:fs'
43
import { resolve } from 'node:path'
4+
import fastifyStatic from '@fastify/static'
55
import { getAbsoluteFSPath } from 'swagger-ui-dist'
66

77
export function addUI(instance: FastifyInstance, prefix: string): void {

test/spec.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import fastify, { type FastifyReply, type FastifyRequest } from 'fastify'
1+
import type { FastifyReply, FastifyRequest } from 'fastify'
22
import { deepStrictEqual } from 'node:assert'
33
import { test } from 'node:test'
4+
import fastify from 'fastify'
45
import { plugin as fastifyOpenApiDocs } from '../src/index.ts'
56

67
const openapi = {

test/ui.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import fastify from 'fastify'
21
import { deepStrictEqual, ok } from 'node:assert'
32
import { test } from 'node:test'
3+
import fastify from 'fastify'
44
import { plugin as fastifyOpenApiDocs } from '../src/index.ts'
55

66
test('UI serving', async () => {

0 commit comments

Comments
 (0)