Skip to content

Commit b342c03

Browse files
refactor: simplify tsconfig
1 parent 2d44c43 commit b342c03

4 files changed

Lines changed: 5 additions & 20 deletions

File tree

build.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { BuildConfig } from 'unbuild'
22
import { defineBuildConfig } from 'unbuild'
33

4-
const build: BuildConfig[] = defineBuildConfig({
4+
const config: BuildConfig[] = defineBuildConfig({
55
entries: [
66
'src/cli/index',
77
'src/config',
@@ -22,4 +22,4 @@ const build: BuildConfig[] = defineBuildConfig({
2222
declaration: 'node16',
2323
})
2424

25-
export default build
25+
export default config

src/openapi/types.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ import type {
88
SuccessResponse,
99
} from 'openapi-typescript-helpers'
1010

11-
// Import HeadersInit from DOM types
12-
type HeadersInit = string[][] | Record<string, string> | Headers
13-
1411
export type FetchResponseData<T extends Record<PropertyKey, any>> = SuccessResponse<ResponseObjectMap<T>, MediaType>
1512
export type FetchResponseError<T extends Record<PropertyKey, any>> = FetchError<ErrorResponse<ResponseObjectMap<T>, MediaType>>
1613

tsconfig.json

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,21 @@
11
{
22
"compilerOptions": {
33
"target": "ES2022",
4-
"lib": ["ESNext"],
54
"rootDir": ".",
65
"module": "NodeNext",
76
"moduleResolution": "NodeNext",
8-
"paths": {
9-
"apiful": [
10-
"./src/index.ts"
11-
],
12-
"apiful/types": [
13-
"./src/types/index.ts"
14-
],
15-
"apiful/utils": [
16-
"./src/utils/index.ts"
17-
]
18-
},
197
"resolveJsonModule": true,
208
"types": ["node", "vitest/globals"],
219
"allowImportingTsExtensions": true,
2210
"strict": true,
11+
"noUncheckedIndexedAccess": true,
2312
"declaration": true,
2413
"noEmit": true,
2514
"outDir": "dist",
2615
"esModuleInterop": true,
2716
"isolatedDeclarations": true,
2817
"isolatedModules": true,
2918
"verbatimModuleSyntax": true,
30-
"skipDefaultLibCheck": true,
3119
"skipLibCheck": true
3220
}
3321
}

vitest.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { UserConfig } from 'vite'
22
import { defineConfig } from 'vitest/config'
33

4-
const vite: UserConfig = defineConfig({
4+
const config: UserConfig = defineConfig({
55
test: {
66
poolOptions: {
77
forks: {
@@ -12,4 +12,4 @@ const vite: UserConfig = defineConfig({
1212
},
1313
})
1414

15-
export default vite
15+
export default config

0 commit comments

Comments
 (0)