mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-24 21:48:02 +02:00
chore(v2): Fix more linter warnings (#4450)
This commit is contained in:
parent
3422f80a9a
commit
83d043ecb3
27 changed files with 116 additions and 85 deletions
7
packages/docusaurus-types/src/index.d.ts
vendored
7
packages/docusaurus-types/src/index.d.ts
vendored
|
@ -114,7 +114,7 @@ export type I18n = {
|
|||
export interface DocusaurusContext {
|
||||
siteConfig: DocusaurusConfig;
|
||||
siteMetadata: DocusaurusSiteMetadata;
|
||||
globalData: Record<string, any>;
|
||||
globalData: Record<string, unknown>;
|
||||
i18n: I18n;
|
||||
codeTranslations: Record<string, string>;
|
||||
isClient: boolean;
|
||||
|
@ -187,7 +187,7 @@ export type HtmlTags = string | HtmlTagObject | (string | HtmlTagObject)[];
|
|||
export interface Props extends LoadContext, InjectedHtmlTags {
|
||||
routes: RouteConfig[];
|
||||
routesPaths: string[];
|
||||
plugins: Plugin<any>[];
|
||||
plugins: Plugin<unknown>[];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -199,6 +199,7 @@ export interface PropsPostBuild extends Props {
|
|||
|
||||
export interface PluginContentLoadedActions {
|
||||
addRoute(config: RouteConfig): void;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
createData(name: string, data: any): Promise<string>;
|
||||
setGlobalData<T = unknown>(data: T): void;
|
||||
}
|
||||
|
@ -212,7 +213,7 @@ export type AllContent = Record<
|
|||
>;
|
||||
|
||||
// TODO improve type (not exposed by postcss-loader)
|
||||
export type PostCssOptions = Record<string, any> & {plugins: any[]};
|
||||
export type PostCssOptions = Record<string, unknown> & {plugins: unknown[]};
|
||||
|
||||
export interface Plugin<T> {
|
||||
name: string;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue