mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-12 08:37:25 +02:00
chore(v2): Fix linter warnings (#4442)
* chore(v2): Fix linter warnings 223 warnings to 145 warnings * Remove explicit type annotations * Do not prefetch when targetLink == null
This commit is contained in:
parent
f041a37622
commit
5e73c72f26
39 changed files with 146 additions and 71 deletions
|
@ -120,7 +120,10 @@ export function processDocMetadata({
|
|||
const docsFileDirName = path.dirname(source);
|
||||
|
||||
const {frontMatter = {}, excerpt} = parseMarkdownString(content);
|
||||
const {sidebar_label, custom_edit_url} = frontMatter;
|
||||
const {
|
||||
sidebar_label: sidebarLabel,
|
||||
custom_edit_url: customEditURL,
|
||||
} = frontMatter;
|
||||
|
||||
const baseID: string =
|
||||
frontMatter.id || path.basename(source, path.extname(source));
|
||||
|
@ -206,7 +209,7 @@ export function processDocMetadata({
|
|||
source: aliasedSitePath(filePath, siteDir),
|
||||
slug: docSlug,
|
||||
permalink,
|
||||
editUrl: custom_edit_url !== undefined ? custom_edit_url : getDocEditUrl(),
|
||||
editUrl: customEditURL !== undefined ? customEditURL : getDocEditUrl(),
|
||||
version: versionMetadata.versionName,
|
||||
lastUpdatedBy: lastUpdate.lastUpdatedBy,
|
||||
lastUpdatedAt: lastUpdate.lastUpdatedAt,
|
||||
|
@ -215,6 +218,6 @@ export function processDocMetadata({
|
|||
lastUpdate.lastUpdatedAt * 1000,
|
||||
)
|
||||
: undefined,
|
||||
sidebar_label,
|
||||
sidebar_label: sidebarLabel,
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue