mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-20 12:37:01 +02:00
chore(v2): fix several lint warnings, add missing types, cleanup (#3844)
* fix several lint warnings, add missing types, cleanup * fix EnumChangefreq issue * better utilization of EnumChangefreq type * update test snapshot
This commit is contained in:
parent
139b668737
commit
ad31facb32
49 changed files with 228 additions and 171 deletions
|
@ -272,6 +272,6 @@ export function linkify({
|
|||
}
|
||||
|
||||
// Order matters: we look in priority in localized folder
|
||||
export function getContentPathList(contentPaths: BlogContentPaths) {
|
||||
export function getContentPathList(contentPaths: BlogContentPaths): string[] {
|
||||
return [contentPaths.contentPathLocalized, contentPaths.contentPath];
|
||||
}
|
||||
|
|
|
@ -38,9 +38,15 @@ export interface PluginOptions {
|
|||
blogDescription: string;
|
||||
blogSidebarCount: number | 'ALL';
|
||||
blogSidebarTitle: string;
|
||||
remarkPlugins: ([Function, object] | Function)[];
|
||||
beforeDefaultRehypePlugins: ([Function, object] | Function)[];
|
||||
beforeDefaultRemarkPlugins: ([Function, object] | Function)[];
|
||||
remarkPlugins: ([Function, Record<string, unknown>] | Function)[];
|
||||
beforeDefaultRehypePlugins: (
|
||||
| [Function, Record<string, unknown>]
|
||||
| Function
|
||||
)[];
|
||||
beforeDefaultRemarkPlugins: (
|
||||
| [Function, Record<string, unknown>]
|
||||
| Function
|
||||
)[];
|
||||
rehypePlugins: string[];
|
||||
truncateMarker: RegExp;
|
||||
showReadingTime: boolean;
|
||||
|
@ -52,7 +58,7 @@ export interface PluginOptions {
|
|||
language?: string;
|
||||
};
|
||||
editUrl?: string;
|
||||
admonitions: any;
|
||||
admonitions: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export interface BlogTags {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
declare module 'remark-admonitions' {
|
||||
type Options = any;
|
||||
type Options = Record<string, unknown>;
|
||||
|
||||
const plugin: (options?: Options) => void;
|
||||
export = plugin;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue