Skip to content

Commit 803197c

Browse files
Update configs
1 parent b3e79d1 commit 803197c

File tree

5 files changed

+61
-20
lines changed

5 files changed

+61
-20
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ trim_trailing_whitespace = false
1414
[*.{yml,yaml}]
1515
indent_size = 2
1616

17-
[*.{js,ts,vue}]
17+
[*.{js,ts,mts,vue}]
1818
indent_size = 2
1919
indent_style = tab
2020

tsconfig.json

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,21 @@
2424
"paths": {
2525
"@/*": [
2626
"./src/*"
27+
],
28+
"@types/*": [
29+
"./src/plugin/types/*"
30+
],
31+
"@components/*": [
32+
"./src/plugin/components/*"
33+
],
34+
"@composables/*": [
35+
"./src/plugin/composables/*"
36+
],
37+
"@slots/*": [
38+
"./src/plugin/slots/*"
39+
],
40+
"@utils/*": [
41+
"./src/plugin/utils/*"
2742
]
2843
},
2944
"resolveJsonModule": true,
@@ -32,7 +47,7 @@
3247
"strict": true,
3348
"target": "ESNext",
3449
"typeRoots": [
35-
"./src/types",
50+
"./src/plugin/types",
3651
"./node_modules/@types",
3752
"./node_modules/vuetify"
3853
],
@@ -43,25 +58,21 @@
4358
},
4459
"exclude": [
4560
"playground",
61+
"src/**/*.spec.ts",
62+
"src/**/*.test.ts",
4663
"src/App.vue",
47-
"src/main.ts",
48-
"src/layout/**/*.ts",
49-
"src/layout/**/*.vue",
50-
"src/components/**/*.ts",
51-
"src/components/**/*.vue",
5264
"src/documentation/**/*.ts",
5365
"src/documentation/**/*.vue",
54-
"src/playground/**/*.vue",
66+
"src/main.ts",
5567
"src/playground/**/*.ts",
56-
"src/stores/**/*.ts",
5768
"src/plugins/**/*.ts",
69+
"src/stores/**/*.ts",
5870
"node_modules"
5971
],
6072
"include": [
61-
"src/types/auto-imports.d.ts",
62-
"src/types/**/*.ts",
63-
"src/types/**/*.d.ts",
73+
"src/playground/PlaygroundPage.vue",
6474
"src/plugin/**/*.ts",
75+
"src/plugin/**/*.tsx",
6576
"src/plugin/**/*.vue"
6677
],
6778
"references": [

tsconfig.node.json

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
{
2-
"compilerOptions": {
3-
"composite": true,
4-
"skipLibCheck": true,
5-
"module": "ESNext",
6-
"moduleResolution": "bundler",
7-
"allowSyntheticDefaultImports": true
8-
},
9-
"include": ["vite.config.ts"]
2+
"compilerOptions": {
3+
"composite": true,
4+
"skipLibCheck": true,
5+
"module": "ESNext",
6+
"moduleResolution": "bundler",
7+
"allowSyntheticDefaultImports": true
8+
},
9+
"include": [
10+
"vite.config.mts"
11+
]
1012
}

vite.config.mts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,20 @@ export default defineConfig({
5252
resolve: {
5353
alias: {
5454
'@': fileURLToPath(new URL('./src', import.meta.url)),
55+
'@components': fileURLToPath(new URL('./src/plugin/components', import.meta.url)),
56+
'@composables': fileURLToPath(new URL('./src/plugin/composables', import.meta.url)),
57+
'@plugin': fileURLToPath(new URL('./src/plugin', import.meta.url)),
5558
'@root': fileURLToPath(new URL('.', import.meta.url)),
59+
'@slots': fileURLToPath(new URL('./src/plugin/slots', import.meta.url)),
60+
'@types': fileURLToPath(new URL('./src/plugin/types', import.meta.url)),
61+
'@utils': fileURLToPath(new URL('./src/plugin/utils', import.meta.url)),
5662
},
5763
extensions: [
5864
'.js',
5965
'.json',
6066
'.jsx',
6167
'.mjs',
68+
'.mts',
6269
'.ts',
6370
'.tsx',
6471
'.vue',

vitest.config.mts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { fileURLToPath } from 'node:url';
2+
import { mergeConfig, defineConfig, configDefaults } from 'vitest/config';
3+
import viteConfig from './vite.config.mts';
4+
5+
export default mergeConfig(
6+
viteConfig,
7+
defineConfig({
8+
test: {
9+
environment: 'jsdom',
10+
exclude: [
11+
...configDefaults.exclude,
12+
],
13+
root: fileURLToPath(new URL('./', import.meta.url)),
14+
server: {
15+
deps: {
16+
inline: ['element-plus', 'vuetify-color-field', 'vuetify']
17+
}
18+
},
19+
}
20+
})
21+
);

0 commit comments

Comments
 (0)