Skip to content

Commit c493cc7

Browse files
authored
fix: resolve TypeScript type errors in .vitepress/config (#2549)
* fix: resolve TypeScript type errors in .vitepress/config * ci: add docs typecheck
1 parent 30b7491 commit c493cc7

File tree

5 files changed

+17
-11
lines changed

5 files changed

+17
-11
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ jobs:
3535
- run: pnpm run test:build
3636
- run: pnpm run tsd
3737
- run: pnpm run vue-tsc
38+
- run: pnpm run tsc:docs

docs/.vitepress/config/en.mts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import type { DefaultTheme, LocalSpecificConfig } from 'vitepress'
1+
import type { DefaultTheme, LocaleSpecificConfig } from 'vitepress'
22

33
export const META_URL = ''
44
export const META_TITLE = 'Vue Test Utils'
55
export const META_DESCRIPTION = 'The official testing suite utils for Vue.js 3'
66

7-
export const enConfig: LocalSpecificConfig<DefaultTheme.config> = {
7+
export const enConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
88
description: META_DESCRIPTION,
99
head: [
1010
['meta', { property: 'og:url', content: META_URL }],
@@ -39,7 +39,6 @@ export const enConfig: LocalSpecificConfig<DefaultTheme.config> = {
3939
},
4040
{
4141
text: 'Essentials',
42-
collapsable: false,
4342
items: [
4443
{ text: 'Getting Started', link: '/guide/' },
4544
{ text: 'A Crash Course', link: '/guide/essentials/a-crash-course' },
@@ -64,7 +63,6 @@ export const enConfig: LocalSpecificConfig<DefaultTheme.config> = {
6463
},
6564
{
6665
text: 'Vue Test Utils in depth',
67-
collapsable: false,
6866
items: [
6967
{ text: 'Slots', link: '/guide/advanced/slots' },
7068
{
@@ -97,7 +95,6 @@ export const enConfig: LocalSpecificConfig<DefaultTheme.config> = {
9795
},
9896
{
9997
text: 'Extending Vue Test Utils',
100-
collapsable: false,
10198
items: [
10299
{ text: 'Plugins', link: '/guide/extending-vtu/plugins' },
103100
{

docs/.vitepress/config/fr.mts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import type { DefaultTheme, LocalSpecificConfig } from 'vitepress'
1+
import type { DefaultTheme, LocaleSpecificConfig } from 'vitepress'
22

33
export const META_URL = ''
44
export const META_TITLE = 'Vue Test Utils'
55
export const META_DESCRIPTION = 'La librairie officielle de tests unitaires pour Vue.js 3'
66

7-
export const frConfig: LocalSpecificConfig<DefaultTheme.config> = {
7+
export const frConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
88
description: META_DESCRIPTION,
99
head: [
1010
['meta', { property: 'og:url', content: META_URL }],
@@ -43,7 +43,6 @@ export const frConfig: LocalSpecificConfig<DefaultTheme.config> = {
4343
},
4444
{
4545
text: 'Les Bases',
46-
collapsable: false,
4746
items: [
4847
{ text: 'Pour commencer', link: '/fr/guide/' },
4948
{ text: 'Cours rapide', link: '/fr/guide/essentials/a-crash-course' },
@@ -68,7 +67,6 @@ export const frConfig: LocalSpecificConfig<DefaultTheme.config> = {
6867
},
6968
{
7069
text: 'Vue Test Utils en détail',
71-
collapsable: false,
7270
items: [
7371
{ text: 'Slots', link: '/fr/guide/advanced/slots' },
7472
{
@@ -101,7 +99,6 @@ export const frConfig: LocalSpecificConfig<DefaultTheme.config> = {
10199
},
102100
{
103101
text: 'Extensions de Vue Test Utils',
104-
collapsable: false,
105102
items: [
106103
{ text: 'Plugins', link: '/fr/guide/extending-vtu/plugins' },
107104
{
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "../../tsconfig.json",
3+
"compilerOptions": {
4+
"skipLibCheck": true,
5+
"noEmit": true,
6+
"allowImportingTsExtensions": true,
7+
"resolveJsonModule": true
8+
},
9+
"include": ["./config", "./theme"]
10+
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
"test:watch": "vitest --watch",
8585
"test:build": "vitest --mode test-build",
8686
"tsd": "tsc -p test-dts/tsconfig.tsd.json",
87+
"tsc:docs": "vue-tsc -p docs/.vitepress/tsconfig.vitepress.json",
8788
"build": "rollup -c rollup.config.ts --bundleConfigAsCjs",
8889
"prepare": "rollup -c rollup.config.ts --bundleConfigAsCjs",
8990
"lint": "eslint .",
@@ -125,4 +126,4 @@
125126
]
126127
}
127128
}
128-
}
129+
}

0 commit comments

Comments
 (0)