mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-06 10:20:09 +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
|
@ -36,14 +36,16 @@ describe('DefaultSidebarItemsGenerator', () => {
|
|||
function mockCategoryMetadataFiles(
|
||||
categoryMetadataFiles: Record<string, Partial<CategoryMetadataFile>>,
|
||||
) {
|
||||
jest.spyOn(fs, 'pathExists').mockImplementation((metadataFilePath) => {
|
||||
return typeof categoryMetadataFiles[metadataFilePath] !== 'undefined';
|
||||
});
|
||||
jest
|
||||
.spyOn(fs, 'pathExists')
|
||||
.mockImplementation(
|
||||
(metadataFilePath) =>
|
||||
typeof categoryMetadataFiles[metadataFilePath] !== 'undefined',
|
||||
);
|
||||
jest.spyOn(fs, 'readFile').mockImplementation(
|
||||
// @ts-expect-error: annoying TS error due to overrides
|
||||
async (metadataFilePath: string) => {
|
||||
return JSON.stringify(categoryMetadataFiles[metadataFilePath]);
|
||||
},
|
||||
async (metadataFilePath: string) =>
|
||||
JSON.stringify(categoryMetadataFiles[metadataFilePath]),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -21,9 +21,7 @@ describe('processSidebars', () => {
|
|||
];
|
||||
|
||||
const StaticSidebarItemsGenerator: SidebarItemsGenerator = jest.fn(
|
||||
async () => {
|
||||
return StaticGeneratedSidebarSlice;
|
||||
},
|
||||
async () => StaticGeneratedSidebarSlice,
|
||||
);
|
||||
|
||||
async function testProcessSidebars(unprocessedSidebars: NormalizedSidebars) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue