mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-11 16:17:25 +02:00
chore(v2): fix several lint warnings, add missing types, cleanup (#3844)
* fix several lint warnings, add missing types, cleanup * fix EnumChangefreq issue * better utilization of EnumChangefreq type * update test snapshot
This commit is contained in:
parent
139b668737
commit
ad31facb32
49 changed files with 228 additions and 171 deletions
|
@ -266,7 +266,7 @@ export function parseMarkdownString(markdownString: string): ParsedMarkdown {
|
|||
return {frontMatter, content, excerpt};
|
||||
} catch (e) {
|
||||
throw new Error(`Error while parsing markdown front matter.
|
||||
This can happen if you use special characteres like : in frontmatter values (try using "" around that value)
|
||||
This can happen if you use special characters like : in frontmatter values (try using "" around that value)
|
||||
${e.message}`);
|
||||
}
|
||||
}
|
||||
|
@ -394,7 +394,7 @@ export function isValidPathname(str: string): boolean {
|
|||
}
|
||||
|
||||
// resolve pathname and fail fast if resolution fails
|
||||
export function resolvePathname(to: string, from?: string) {
|
||||
export function resolvePathname(to: string, from?: string): string {
|
||||
return resolvePathnameUnsafe(to, from);
|
||||
}
|
||||
export function addLeadingSlash(str: string): string {
|
||||
|
@ -456,7 +456,7 @@ export function getPluginI18nPath({
|
|||
pluginName: string;
|
||||
pluginId?: string | undefined;
|
||||
subPaths?: string[];
|
||||
}) {
|
||||
}): string {
|
||||
return path.join(
|
||||
siteDir,
|
||||
'i18n',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue