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:
Sam Zhou 2021-03-17 12:28:42 -04:00 committed by GitHub
parent f041a37622
commit 5e73c72f26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
39 changed files with 146 additions and 71 deletions

View file

@ -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';

View file

@ -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;