Skip to content

Commit b66c0db

Browse files
authored
Merge pull request #8 from softnetics/yu/chore/error
[Chore] Fix Typescript, ESLint, Test error
2 parents c381b0c + 4bbb87b commit b66c0db

64 files changed

Lines changed: 339 additions & 934 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"source.fixAll.eslint": "explicit",
99
"source.organizeImports": "never"
1010
},
11+
"typescript.preferences.importModuleSpecifier": "relative",
1112
"npm.packageManager": "pnpm",
1213
"editor.defaultFormatter": "esbenp.prettier-vscode",
1314
"[typescript]": {

examples/erp/.prettierignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.*
7+
.yarn/*
8+
!.yarn/patches
9+
!.yarn/plugins
10+
!.yarn/releases
11+
!.yarn/versions
12+
13+
# testing
14+
/coverage
15+
16+
# next.js
17+
/.next/
18+
/out/
19+
20+
# production
21+
/build
22+
23+
# misc
24+
.DS_Store
25+
*.pem
26+
27+
# debug
28+
npm-debug.log*
29+
yarn-debug.log*
30+
yarn-error.log*
31+
.pnpm-debug.log*
32+
33+
# env files (can opt-in for committing if needed)
34+
.env*
35+
36+
# vercel
37+
.vercel
38+
39+
# typescript
40+
*.tsbuildinfo
41+
next-env.d.ts
42+
43+
drizzle

examples/erp/package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"format": "prettier --write .",
1111
"format:check": "prettier --check .",
1212
"typecheck": "tsc --noEmit",
13-
"test": "vitest run",
1413
"db:migrate": "drizzle-kit migrate",
1514
"db:generate": "drizzle-kit generate"
1615
},
@@ -24,17 +23,17 @@
2423
"next-themes": "^0.4.6",
2524
"pg": "^8.14.1",
2625
"postcss": "^8.5.3",
27-
"react": "18.3.1",
28-
"react-dom": "18.3.1",
26+
"react": "19.1.0",
27+
"react-dom": "19.1.0",
2928
"tailwindcss": "^4.0.14",
3029
"zod": "3.24.4"
3130
},
3231
"devDependencies": {
3332
"@internals/project-config": "workspace:^",
3433
"@types/node": "^22.13.10",
3534
"@types/pg": "^8.11.11",
36-
"@types/react": "18.3.18",
37-
"@types/react-dom": "18.3.5",
35+
"@types/react": "19.1.4",
36+
"@types/react-dom": "19.1.5",
3837
"@vitejs/plugin-react": "^4.3.4",
3938
"drizzle-kit": "^0.30.6",
4039
"type-fest": "^4.38.0",

examples/erp/src/app/(admin)/_helper/server.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use server'
22

3-
import { handleServerFunction, ServerFunction } from '@kivotos/next'
3+
import { handleServerFunction, type ServerFunction } from '@kivotos/next'
44

55
import { serverConfig } from '~/drizzlify/config'
66

examples/erp/src/components/providers.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client'
22

3-
import { PropsWithChildren } from 'react'
3+
import type { PropsWithChildren } from 'react'
44

55
import { ThemeProvider as NextThemesProvider } from 'next-themes'
66

internals/project-config/eslint/base.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ const config = tseslint.config(
5353
],
5454
'@typescript-eslint/no-explicit-any': 'off',
5555
'@typescript-eslint/no-empty-object-type': 'off',
56+
'@typescript-eslint/consistent-type-imports': 'error',
5657
},
5758
},
5859
{

internals/project-config/tsconfig/base.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"preserveWatchOutput": true,
1717
"skipLibCheck": true,
1818
"strict": true,
19-
"resolveJsonModule": true
19+
"resolveJsonModule": true,
20+
"verbatimModuleSyntax": true
2021
},
2122
"exclude": ["node_modules"]
2223
}

packages/core/src/auth/context.ts

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

4-
import { AnyAccountTable, AnySessionTable, AnyUserTable, AuthConfig } from '.'
5+
import type { AnyAccountTable, AnySessionTable, AnyUserTable, AuthConfig } from '.'
56
import { AccountProvider } from './constant'
67
import { getSessionCookie } from './utils'
78

8-
import { MinimalContext } from '../config'
9+
import type { MinimalContext } from '../config'
910

1011
type InferTableType<T extends AnyTable<{}>> = UndefinedToOptional<{
1112
[K in keyof T['_']['columns']]: T['_']['columns'][K]['_']['notNull'] extends true

packages/core/src/auth/handlers/forgot-password.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import z from 'zod'
22

3-
import { ApiRouteHandler, ApiRouteSchema, createEndpoint } from '../../endpoint'
4-
import { AuthContext } from '../context'
3+
import { type ApiRouteHandler, type ApiRouteSchema, createEndpoint } from '../../endpoint'
4+
import { type AuthContext } from '../context'
55

66
interface InternalRouteOptions {
77
prefix?: string

packages/core/src/auth/handlers/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { signInEmail } from './sign-in-email'
55
import { signOut } from './sign-out'
66
import { signUp } from './sign-up'
77

8-
import { AuthConfig } from '..'
8+
import type { AuthConfig } from '..'
99

1010
export function createAuthHandlers<TAuthConfig extends AuthConfig>(config: TAuthConfig) {
1111
const handlers = {

0 commit comments

Comments
 (0)