Skip to content

Commit 2461393

Browse files
committed
chore: split tsconfig into app and node configuration
1 parent be9ebba commit 2461393

6 files changed

Lines changed: 87 additions & 57 deletions

File tree

‎eslint.config.mjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export default defineConfig([
5959
tsconfigRootDir: process.cwd(),
6060
extraFileExtensions: ['.vue'],
6161
parser: '@typescript-eslint/parser',
62-
project: './tsconfig.json'
62+
project: ['./tsconfig.app.json', './tsconfig.node.json']
6363
},
6464
globals: {
6565
process: true

‎package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"@vitejs/plugin-vue": "6.0.6",
5252
"@vue/eslint-config-prettier": "10.2.0",
5353
"@vue/eslint-config-typescript": "14.7.0",
54+
"@vue/tsconfig": "0.9.1",
5455
"eslint": "10.2.1",
5556
"eslint-config-prettier": "10.1.8",
5657
"eslint-import-resolver-typescript": "4.4.4",

‎pnpm-lock.yaml‎

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎tsconfig.app.json‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"include": ["src/**/*.ts", "src/**/*.vue"],
3+
"extends": "@vue/tsconfig/tsconfig.dom.json",
4+
"compilerOptions": {
5+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
6+
7+
/* Linting */
8+
"noUnusedLocals": true,
9+
"noUnusedParameters": true,
10+
"erasableSyntaxOnly": true,
11+
"noFallthroughCasesInSwitch": true,
12+
"verbatimModuleSyntax": false /* Compatibility */,
13+
/* Vue */
14+
"types": ["node", "vite/client", "vite-plugin-pwa/client"],
15+
16+
/* Convenience */
17+
"rootDir": ".",
18+
"paths": {
19+
"@composables/*": ["./src/composables/*"],
20+
"@directives/*": ["./src/directives/*"],
21+
"@components/*": ["./src/app/components/*"],
22+
"@app/*": ["./src/app/*"],
23+
"@i18n/*": ["./src/i18n/*"],
24+
"@styles/*": ["./src/styles/*"],
25+
"@static/*": ["./src/static/*"],
26+
"@utils/*": ["./src/utils/*"],
27+
"@store/*": ["./src/store/*"]
28+
}
29+
}
30+
}

‎tsconfig.json‎

Lines changed: 5 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,7 @@
11
{
2-
"include": [
3-
"src/**/*.ts",
4-
"src/**/*.vue",
5-
"test/**/*.ts",
6-
"scripts/**/*.ts",
7-
"docs/.vitepress/**/*.ts",
8-
"vite.config.ts",
9-
"eslint.config.mjs",
10-
"playwright.config.ts"
11-
],
12-
"compilerOptions": {
13-
"target": "ESNext",
14-
"useDefineForClassFields": true,
15-
"module": "ESNext",
16-
"lib": ["ESNext", "DOM"],
17-
"skipLibCheck": true,
18-
19-
/* Bundler mode */
20-
"moduleResolution": "bundler",
21-
"allowImportingTsExtensions": true,
22-
"resolveJsonModule": true,
23-
"esModuleInterop": true,
24-
"isolatedModules": true,
25-
"moduleDetection": "force",
26-
"forceConsistentCasingInFileNames": true,
27-
"libReplacement": false,
28-
"noEmit": true,
29-
"jsx": "preserve",
30-
"jsxImportSource": "vue",
31-
32-
/* Linting */
33-
"strict": true,
34-
"noImplicitThis": true,
35-
"noUnusedLocals": true,
36-
"noUnusedParameters": true,
37-
"erasableSyntaxOnly": true,
38-
"noFallthroughCasesInSwitch": true,
39-
"noUncheckedSideEffectImports": true,
40-
41-
/* Vue */
42-
"types": ["node", "vite/client", "vite-plugin-pwa/client"],
43-
44-
/* Convenience */
45-
"rootDir": ".",
46-
"paths": {
47-
"@composables/*": ["./src/composables/*"],
48-
"@directives/*": ["./src/directives/*"],
49-
"@components/*": ["./src/app/components/*"],
50-
"@app/*": ["./src/app/*"],
51-
"@i18n/*": ["./src/i18n/*"],
52-
"@styles/*": ["./src/styles/*"],
53-
"@static/*": ["./src/static/*"],
54-
"@utils/*": ["./src/utils/*"],
55-
"@store/*": ["./src/store/*"]
56-
}
57-
}
2+
"files": [],
3+
"references": [
4+
{ "path": "./tsconfig.app.json" },
5+
{ "path": "./tsconfig.node.json" }
6+
]
587
}

‎tsconfig.node.json‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"include": [
3+
"docs/.vitepress/**/*.ts",
4+
"vite.config.ts",
5+
"playwright.config.ts",
6+
"eslint.config.mjs",
7+
"scripts/**/*.ts",
8+
"test/**/*.ts"
9+
],
10+
"compilerOptions": {
11+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
12+
"target": "es2023",
13+
"lib": ["ES2023"],
14+
"module": "esnext",
15+
"types": ["node"],
16+
"skipLibCheck": true,
17+
18+
/* Bundler mode */
19+
"moduleResolution": "bundler",
20+
"allowImportingTsExtensions": true,
21+
"verbatimModuleSyntax": false,
22+
"moduleDetection": "force",
23+
"noEmit": true,
24+
25+
/* Linting */
26+
"noUnusedLocals": true,
27+
"noUnusedParameters": true,
28+
"erasableSyntaxOnly": true,
29+
"noFallthroughCasesInSwitch": true
30+
}
31+
}

0 commit comments

Comments
 (0)