Skip to content

Commit e083a78

Browse files
committed
chore: fix more lint error
1 parent e545e59 commit e083a78

8 files changed

Lines changed: 17 additions & 16 deletions

File tree

packages/core/src/auth/context.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { and, type AnyTable, asc, Column, desc, eq } from 'drizzle-orm'
1+
import type { AnyTable, Column } from 'drizzle-orm'
2+
import { and, asc, desc, eq } from 'drizzle-orm'
23
import type { UndefinedToOptional } from 'type-fest/source/internal'
34

45
import type { AnyAccountTable, AnySessionTable, AnyUserTable, AuthConfig } from '.'

packages/core/src/builder.handler.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { eq, or } from 'drizzle-orm'
2-
import { NodePgDatabase } from 'drizzle-orm/node-postgres'
2+
import type { NodePgDatabase } from 'drizzle-orm/node-postgres'
33
import { beforeEach, describe, expect, it, vi } from 'vitest'
44

55
import * as schema from './__mocks__/test-schema'

packages/core/src/builder.handler.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { Relation, Table } from 'drizzle-orm'
12
import {
23
eq,
34
getTableColumns,
@@ -6,13 +7,11 @@ import {
67
Many,
78
One,
89
or,
9-
Relation,
10-
Table,
1110
type TableRelationalConfig,
1211
} from 'drizzle-orm'
1312
import type { NodePgQueryResultHKT } from 'drizzle-orm/node-postgres'
14-
import { PgTransaction } from 'drizzle-orm/pg-core'
15-
import { RelationalQueryBuilder } from 'drizzle-orm/pg-core/query-builders/query'
13+
import type { PgTransaction } from 'drizzle-orm/pg-core'
14+
import type { RelationalQueryBuilder } from 'drizzle-orm/pg-core/query-builders/query'
1615

1716
import type {
1817
ApiCreateHandler,

packages/core/src/collection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Many, Table, type TableRelationalConfig } from 'drizzle-orm'
1+
import type { Many, Table, TableRelationalConfig } from 'drizzle-orm'
22
import type { ConditionalExcept, Simplify } from 'type-fest'
33
import z from 'zod'
44

packages/core/src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { NodePgDatabase } from 'drizzle-orm/node-postgres'
1+
import type { NodePgDatabase } from 'drizzle-orm/node-postgres'
22
import * as R from 'remeda'
33
import type { Simplify } from 'type-fest'
44

packages/core/src/endpoint.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { IsNever, Simplify, SimplifyDeep, ValueOf } from 'type-fest'
2-
import { z, ZodType } from 'zod'
2+
import type { z, ZodType } from 'zod'
33

44
import type { MaybePromise } from './collection'
55

packages/core/src/field.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1+
import type { Column, Relation } from 'drizzle-orm'
12
import {
2-
Column,
33
type FindTableByDBName,
44
getTableName,
55
is,
66
One,
7-
Relation,
87
type TableRelationalConfig,
98
} from 'drizzle-orm'
109
import type { Simplify } from 'type-fest'
11-
import z, { ZodObject } from 'zod'
10+
import type { ZodObject } from 'zod'
11+
import z from 'zod'
1212

1313
import {
1414
appendFieldNameToFields,

packages/core/src/utils.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import { Column, is, Table, type TableRelationalConfig } from 'drizzle-orm'
1+
import type { Column, TableRelationalConfig } from 'drizzle-orm'
2+
import { is, Table } from 'drizzle-orm'
23
import type { IsNever, Simplify, ValueOf } from 'type-fest'
3-
import z, { ZodObject } from 'zod'
4+
import type { ZodObject, ZodOptional, ZodType } from 'zod'
45

56
import type { Field, FieldRelation, Fields, FieldsInitial, FieldsWithFieldName } from './field'
67

@@ -119,6 +120,6 @@ export type JoinArrays<T extends any[]> = Simplify<
119120

120121
export type ToZodObject<T extends Record<string, any>> = ZodObject<{
121122
[Key in keyof T]-?: T[Key] extends undefined
122-
? z.ZodOptional<z.ZodType<NonNullable<T[Key]>>>
123-
: z.ZodType<T[Key]>
123+
? ZodOptional<ZodType<NonNullable<T[Key]>>>
124+
: ZodType<T[Key]>
124125
}>

0 commit comments

Comments
 (0)