refactor: enforce type import specifiers (#6230)

* refactor: enforce type import specifiers

* fix

* Upgrade esbuild

* Fix (haha)
This commit is contained in:
Joshua Chen 2021-12-31 21:17:09 +08:00 committed by GitHub
parent 24d65d9bdd
commit cb1aa30286
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
192 changed files with 484 additions and 337 deletions

View file

@ -5,8 +5,11 @@
* LICENSE file in the root directory of this source tree.
*/
import {CategoryMetadataFile, DefaultSidebarItemsGenerator} from '../generator';
import {Sidebar, SidebarItemsGenerator} from '../types';
import {
DefaultSidebarItemsGenerator,
type CategoryMetadataFile,
} from '../generator';
import type {Sidebar, SidebarItemsGenerator} from '../types';
import fs from 'fs-extra';
import {DefaultNumberPrefixParser} from '../../numberPrefix';

View file

@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
import {processSidebars, SidebarProcessorParams} from '../processor';
import {processSidebars, type SidebarProcessorParams} from '../processor';
import type {
SidebarItem,
SidebarItemsGenerator,
@ -14,7 +14,7 @@ import type {
} from '../types';
import {DefaultSidebarItemsGenerator} from '../generator';
import {createSlugger} from '@docusaurus/utils';
import {VersionMetadata} from '../../types';
import type {VersionMetadata} from '../../types';
import {DefaultNumberPrefixParser} from '../../numberPrefix';
describe('processSidebars', () => {

View file

@ -12,12 +12,12 @@ import {
collectSidebarLinks,
transformSidebarItems,
collectSidebarsDocIds,
SidebarNavigation,
type SidebarNavigation,
toDocNavigationLink,
toNavigationLink,
} from '../utils';
import type {Sidebar, Sidebars} from '../types';
import {DocMetadataBase, DocNavLink} from '../../types';
import type {DocMetadataBase, DocNavLink} from '../../types';
describe('createSidebarsUtils', () => {
const sidebar1: Sidebar = [

View file

@ -6,8 +6,8 @@
*/
import {validateSidebars, validateCategoryMetadataFile} from '../validation';
import {CategoryMetadataFile} from '../generator';
import {SidebarsConfig} from '../types';
import type {CategoryMetadataFile} from '../generator';
import type {SidebarsConfig} from '../types';
describe('validateSidebars', () => {
// TODO add more tests