Skip to content

Commit 95f2b05

Browse files
committed
chore(tsconfig): restructure TypeScript configuration files
- Added a new `tsconfig.app.json` for application-specific TypeScript settings. - Updated `tsconfig.json` to reference the new `tsconfig.app.json` and removed direct compiler options. - Enhanced `tsconfig.node.json` with additional compiler options for improved linting and module resolution.
1 parent 9fbdfa3 commit 95f2b05

3 files changed

Lines changed: 41 additions & 32 deletions

File tree

tsconfig.app.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"extends": "@vue/tsconfig/tsconfig.dom.json",
3+
"compilerOptions": {
4+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
5+
"types": ["vite/client"],
6+
7+
/* Linting */
8+
"strict": true,
9+
"noUnusedLocals": true,
10+
"noUnusedParameters": true,
11+
"erasableSyntaxOnly": true,
12+
"noFallthroughCasesInSwitch": true,
13+
"noUncheckedSideEffectImports": true
14+
},
15+
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"]
16+
}

tsconfig.json

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,7 @@
11
{
2-
"compilerOptions": {
3-
"target": "ES2020",
4-
"useDefineForClassFields": true,
5-
"module": "ESNext",
6-
"lib": ["ES2020", "DOM", "DOM.Iterable"],
7-
"skipLibCheck": true,
8-
9-
/* Bundler mode */
10-
"moduleResolution": "node",
11-
"resolveJsonModule": true,
12-
"isolatedModules": true,
13-
"noEmit": true,
14-
"jsx": "preserve",
15-
16-
"baseUrl": ".",
17-
"paths": {
18-
"@/*": ["src/*"]
19-
},
20-
21-
/* Linting */
22-
"strict": true,
23-
"noUnusedLocals": true,
24-
"strictNullChecks": true,
25-
"noUnusedParameters": true,
26-
"noFallthroughCasesInSwitch": true
27-
},
28-
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
29-
"references": [{ "path": "./tsconfig.node.json" }]
2+
"files": [],
3+
"references": [
4+
{ "path": "./tsconfig.app.json" },
5+
{ "path": "./tsconfig.node.json" }
6+
]
307
}

tsconfig.node.json

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
11
{
22
"compilerOptions": {
3-
"composite": true,
4-
"skipLibCheck": true,
3+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
4+
"target": "ES2023",
5+
"lib": ["ES2023"],
56
"module": "ESNext",
6-
"moduleResolution": "node",
7-
"allowSyntheticDefaultImports": true
7+
"types": ["node"],
8+
"skipLibCheck": true,
9+
10+
/* Bundler mode */
11+
"moduleResolution": "bundler",
12+
"allowImportingTsExtensions": true,
13+
"verbatimModuleSyntax": true,
14+
"moduleDetection": "force",
15+
"noEmit": true,
16+
17+
/* Linting */
18+
"strict": true,
19+
"noUnusedLocals": true,
20+
"noUnusedParameters": true,
21+
"erasableSyntaxOnly": true,
22+
"noFallthroughCasesInSwitch": true,
23+
"noUncheckedSideEffectImports": true
824
},
925
"include": ["vite.config.ts"]
1026
}

0 commit comments

Comments
 (0)