Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: resolve TypeScript type errors in .vitepress/config #2549

Merged
merged 2 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ jobs:
- run: pnpm run test:build
- run: pnpm run tsd
- run: pnpm run vue-tsc
- run: pnpm run tsc:docs
7 changes: 2 additions & 5 deletions docs/.vitepress/config/en.mts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { DefaultTheme, LocalSpecificConfig } from 'vitepress'
import type { DefaultTheme, LocaleSpecificConfig } from 'vitepress'

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

export const enConfig: LocalSpecificConfig<DefaultTheme.config> = {
export const enConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
description: META_DESCRIPTION,
head: [
['meta', { property: 'og:url', content: META_URL }],
Expand Down Expand Up @@ -39,7 +39,6 @@ export const enConfig: LocalSpecificConfig<DefaultTheme.config> = {
},
{
text: 'Essentials',
collapsable: false,
items: [
{ text: 'Getting Started', link: '/guide/' },
{ text: 'A Crash Course', link: '/guide/essentials/a-crash-course' },
Expand All @@ -64,7 +63,6 @@ export const enConfig: LocalSpecificConfig<DefaultTheme.config> = {
},
{
text: 'Vue Test Utils in depth',
collapsable: false,
items: [
{ text: 'Slots', link: '/guide/advanced/slots' },
{
Expand Down Expand Up @@ -97,7 +95,6 @@ export const enConfig: LocalSpecificConfig<DefaultTheme.config> = {
},
{
text: 'Extending Vue Test Utils',
collapsable: false,
items: [
{ text: 'Plugins', link: '/guide/extending-vtu/plugins' },
{
Expand Down
7 changes: 2 additions & 5 deletions docs/.vitepress/config/fr.mts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { DefaultTheme, LocalSpecificConfig } from 'vitepress'
import type { DefaultTheme, LocaleSpecificConfig } from 'vitepress'

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

export const frConfig: LocalSpecificConfig<DefaultTheme.config> = {
export const frConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
description: META_DESCRIPTION,
head: [
['meta', { property: 'og:url', content: META_URL }],
Expand Down Expand Up @@ -43,7 +43,6 @@ export const frConfig: LocalSpecificConfig<DefaultTheme.config> = {
},
{
text: 'Les Bases',
collapsable: false,
items: [
{ text: 'Pour commencer', link: '/fr/guide/' },
{ text: 'Cours rapide', link: '/fr/guide/essentials/a-crash-course' },
Expand All @@ -68,7 +67,6 @@ export const frConfig: LocalSpecificConfig<DefaultTheme.config> = {
},
{
text: 'Vue Test Utils en détail',
collapsable: false,
items: [
{ text: 'Slots', link: '/fr/guide/advanced/slots' },
{
Expand Down Expand Up @@ -101,7 +99,6 @@ export const frConfig: LocalSpecificConfig<DefaultTheme.config> = {
},
{
text: 'Extensions de Vue Test Utils',
collapsable: false,
items: [
{ text: 'Plugins', link: '/fr/guide/extending-vtu/plugins' },
{
Expand Down
10 changes: 10 additions & 0 deletions docs/.vitepress/tsconfig.vitepress.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"skipLibCheck": true,
"noEmit": true,
"allowImportingTsExtensions": true,
"resolveJsonModule": true
},
"include": ["./config", "./theme"]
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
"test:watch": "vitest --watch",
"test:build": "vitest --mode test-build",
"tsd": "tsc -p test-dts/tsconfig.tsd.json",
"tsc:docs": "vue-tsc -p docs/.vitepress/tsconfig.vitepress.json",
"build": "rollup -c rollup.config.ts --bundleConfigAsCjs",
"prepare": "rollup -c rollup.config.ts --bundleConfigAsCjs",
"lint": "eslint .",
Expand Down Expand Up @@ -125,4 +126,4 @@
]
}
}
}
}