mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-06 21:03:47 +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
|
@ -13,7 +13,7 @@ describe('create config', () => {
|
|||
test('simple test', () => {
|
||||
const v1Config: VersionOneConfig = importFresh(
|
||||
`${__dirname}/__fixtures__/sourceSiteConfig.js`,
|
||||
) as any;
|
||||
);
|
||||
const siteDir = 'website';
|
||||
const newDir = 'websiteMigrated';
|
||||
|
||||
|
|
|
@ -16,9 +16,9 @@ export type Data = {
|
|||
};
|
||||
|
||||
export type ClassicPresetEntries = {
|
||||
docs: {[key: string]: any};
|
||||
blog: {[key: string]: any};
|
||||
theme: {[key: string]: any};
|
||||
docs: {[key: string]: unknown};
|
||||
blog: {[key: string]: unknown};
|
||||
theme: {[key: string]: unknown};
|
||||
};
|
||||
|
||||
export type SidebarEntries = {
|
||||
|
@ -39,7 +39,7 @@ export interface VersionTwoConfig {
|
|||
githubHost?: string;
|
||||
onBrokenLinks: string;
|
||||
onBrokenMarkdownLinks: string;
|
||||
plugins: Array<[string, {[key: string]: any}]>;
|
||||
plugins: Array<[string, {[key: string]: unknown}]>;
|
||||
themes?: [];
|
||||
presets: [[string, ClassicPresetEntries]];
|
||||
themeConfig: {
|
||||
|
@ -114,8 +114,8 @@ export type VersionOneConfig = {
|
|||
gaTrackingId?: string;
|
||||
highlight?: Record<string, unknown>;
|
||||
markdownPlugins?: Array<() => void>;
|
||||
scripts?: Array<{src: string; [key: string]: any} | string>;
|
||||
stylesheets?: Array<{href: string; [key: string]: any} | string>;
|
||||
scripts?: Array<{src: string; [key: string]: unknown} | string>;
|
||||
stylesheets?: Array<{href: string; [key: string]: unknown} | string>;
|
||||
facebookAppId?: string;
|
||||
facebookComments?: true;
|
||||
facebookPixelId?: string;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue