mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-27 05:28:43 +02:00
chore(v2): Fix a lot of eslint warnings (#2972)
This commit is contained in:
parent
4aa77651d3
commit
3611c96f90
46 changed files with 145 additions and 130 deletions
|
@ -135,7 +135,7 @@ function normalizeItem(item: SidebarItemRaw): SidebarItem[] {
|
|||
case 'doc':
|
||||
assertIsDoc(item);
|
||||
return [item];
|
||||
default:
|
||||
default: {
|
||||
const extraMigrationError =
|
||||
item.type === 'subcategory'
|
||||
? "Docusaurus v2: 'subcategory' has been renamed as 'category'"
|
||||
|
@ -145,6 +145,7 @@ function normalizeItem(item: SidebarItemRaw): SidebarItem[] {
|
|||
item.type
|
||||
}]. Sidebar item=${JSON.stringify(item)} ${extraMigrationError}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -168,7 +169,7 @@ function normalizeSidebar(sidebars: SidebarRaw): Sidebar {
|
|||
|
||||
export default function loadSidebars(sidebarPaths?: string[]): Sidebar {
|
||||
// We don't want sidebars to be cached because of hot reloading.
|
||||
let allSidebars: SidebarRaw = {};
|
||||
const allSidebars: SidebarRaw = {};
|
||||
|
||||
if (!sidebarPaths || !sidebarPaths.length) {
|
||||
return {} as Sidebar;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue