mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-15 09:12:24 +02:00
chore: upgrade TypeScript & other ESLint related deps (#5963)
* chore: upgrade ESLint related deps * Upgrade TS * Fix lock * Bump Babel * Update config
This commit is contained in:
parent
2f7d6fea1e
commit
0374426ce3
104 changed files with 2662 additions and 2487 deletions
|
@ -47,11 +47,10 @@ function sanitizedFileContent(
|
|||
): string {
|
||||
const extractedData = extractMetadata(content);
|
||||
const extractedMetaData = Object.entries(extractedData.metadata).reduce(
|
||||
(metaData, [key, value]) => {
|
||||
return `${metaData}\n${key}: ${
|
||||
(metaData, [key, value]) =>
|
||||
`${metaData}\n${key}: ${
|
||||
shouldQuotifyFrontMatter([key, value]) ? `"${value}"` : value
|
||||
}`;
|
||||
},
|
||||
}`,
|
||||
'',
|
||||
);
|
||||
const sanitizedData = `---${extractedMetaData}\n---\n${
|
||||
|
@ -618,28 +617,26 @@ function migrateVersionedSidebar(
|
|||
const newSidebar = Object.entries(sidebar.entries).reduce(
|
||||
(acc: SidebarEntries, val) => {
|
||||
const key = `version-${sidebar.version}/${val[0]}`;
|
||||
acc[key] = Object.entries(val[1]).map((value) => {
|
||||
return {
|
||||
type: 'category',
|
||||
label: value[0],
|
||||
items: (value[1] as Array<SidebarEntry>).map((sidebarItem) => {
|
||||
if (typeof sidebarItem === 'string') {
|
||||
return {
|
||||
type: 'doc',
|
||||
id: `version-${sidebar.version}/${sidebarItem}`,
|
||||
};
|
||||
}
|
||||
acc[key] = Object.entries(val[1]).map((value) => ({
|
||||
type: 'category',
|
||||
label: value[0],
|
||||
items: (value[1] as Array<SidebarEntry>).map((sidebarItem) => {
|
||||
if (typeof sidebarItem === 'string') {
|
||||
return {
|
||||
type: 'category',
|
||||
label: sidebarItem.label,
|
||||
items: sidebarItem.ids.map((id: string) => ({
|
||||
type: 'doc',
|
||||
id: `version-${sidebar.version}/${id}`,
|
||||
})),
|
||||
type: 'doc',
|
||||
id: `version-${sidebar.version}/${sidebarItem}`,
|
||||
};
|
||||
}),
|
||||
};
|
||||
});
|
||||
}
|
||||
return {
|
||||
type: 'category',
|
||||
label: sidebarItem.label,
|
||||
items: sidebarItem.ids.map((id: string) => ({
|
||||
type: 'doc',
|
||||
id: `version-${sidebar.version}/${id}`,
|
||||
})),
|
||||
};
|
||||
}),
|
||||
}));
|
||||
return acc;
|
||||
},
|
||||
{},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue