Skip to content

Commit 1e33b07

Browse files
committed
fix: fixes a potential type-checking issue in some Starlight projects
1 parent fb28487 commit 1e33b07

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

packages/starlight-links-validator/libs/i18n.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import type { StarlightUserConfig } from '@astrojs/starlight/types'
2-
31
import { ensureLeadingSlash, ensureTrailingSlash } from './path'
42
import type { Headings } from './remark'
3+
import type { StarlightUserConfig } from './validation'
54

65
export function getLocaleConfig(config: StarlightUserConfig): LocaleConfig | undefined {
76
if (!config.locales || Object.keys(config.locales).length === 0) return

packages/starlight-links-validator/libs/validation.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { statSync } from 'node:fs'
22
import { posix } from 'node:path'
33
import { fileURLToPath } from 'node:url'
44

5-
import type { StarlightUserConfig } from '@astrojs/starlight/types'
5+
import type { StarlightUserConfig as StarlightUserConfigWithPlugins } from '@astrojs/starlight/types'
66
import type { AstroConfig, AstroIntegrationLogger } from 'astro'
77
import { bgGreen, black, blue, dim, green, red } from 'kleur/colors'
88
import picomatch from 'picomatch'
@@ -278,3 +278,5 @@ interface ValidationContext {
278278
outputDir: URL
279279
pages: Pages
280280
}
281+
282+
export type StarlightUserConfig = Omit<StarlightUserConfigWithPlugins, 'plugins'>

0 commit comments

Comments
 (0)