Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

Commit

Permalink
fix: split tsconfig types and add jsdom
Browse files Browse the repository at this point in the history
  • Loading branch information
davidzwa committed Apr 29, 2023
1 parent faa6343 commit 423ff20
Show file tree
Hide file tree
Showing 6 changed files with 458 additions and 29 deletions.
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
"preview": "vite preview",
"typecheck": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false"
},
"dependencies": {
"@mdi/font": "7.2.96",
Expand All @@ -17,9 +18,12 @@
},
"devDependencies": {
"@babel/types": "7.21.5",
"@types/jsdom": "21.1.1",
"@types/node": "18.16.3",
"@types/webfontloader": "1.6.35",
"@vitejs/plugin-vue": "4.2.1",
"@vue/tsconfig": "0.1.3",
"jsdom": "21.1.1",
"typescript": "5.0.4",
"vite": "4.2.2",
"vite-plugin-vuetify": "1.0.2",
Expand Down
19 changes: 19 additions & 0 deletions tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"extends": "@vue/tsconfig/tsconfig.web.json",
"include": [
"env.d.ts",
"package.json",
"src/**/*",
"src/**/*.vue",
"src/**/*.json"
],
"exclude": ["src/**/__tests__/*"],
"compilerOptions": {
"composite": true,
"resolveJsonModule": true,
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
}
}
39 changes: 14 additions & 25 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,17 @@
{
"compilerOptions": {
"baseUrl": ".",
"target": "esnext",
"useDefineForClassFields": true,
"allowSyntheticDefaultImports": true,
"composite": true,
"module": "esnext",
"moduleResolution": "node",
"strict": true,
"jsx": "preserve",
"sourceMap": false,
"resolveJsonModule": true,
"esModuleInterop": true,
"lib": ["esnext", "dom"],
"types": ["vuetify"],
"paths": {
"@/*": ["src/*"]
"files": [],
"references": [
{
"path": "./tsconfig.vite-config.json"
},
{
"path": "./tsconfig.app.json"
},
},
"include": [
"src/**/*.ts",
"src/**/*.d.ts",
"src/**/*.tsx",
"src/**/*.vue",
"vite.config.ts"
]
{
"path": "./tsconfig.vitest.json"
}
],
"compilerOptions": {
"strict": true
}
}
8 changes: 8 additions & 0 deletions tsconfig.vite-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "@vue/tsconfig/tsconfig.node.json",
"include": ["vite.config.*"],
"compilerOptions": {
"composite": true,
"types": ["node", "vitest"]
}
}
11 changes: 11 additions & 0 deletions tsconfig.vitest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "./tsconfig.app.json",
"exclude": [],
"compilerOptions": {
"composite": true,
"lib": [],
"preserveValueImports": false,
"importsNotUsedAsValues": "remove",
"types": ["node", "jsdom"]
}
}
Loading

0 comments on commit 423ff20

Please sign in to comment.