mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-21 04:57:05 +02:00
refactor: reduce number of leaked anys (#7465)
This commit is contained in:
parent
6e62bba30f
commit
89b0fff128
39 changed files with 121 additions and 89 deletions
|
@ -17,8 +17,9 @@ export const NODE_MINOR_VERSION = parseInt(
|
|||
);
|
||||
|
||||
/** Docusaurus core version. */
|
||||
// eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
|
||||
export const DOCUSAURUS_VERSION = require('../package.json').version;
|
||||
export const DOCUSAURUS_VERSION =
|
||||
// eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
|
||||
(require('../package.json') as {version: string}).version;
|
||||
|
||||
/**
|
||||
* Can be overridden with cli option `--out-dir`. Code should generally use
|
||||
|
|
|
@ -280,7 +280,10 @@ This can happen if you use special characters in front matter values (try using
|
|||
}
|
||||
|
||||
function unwrapMarkdownLinks(line: string): string {
|
||||
return line.replace(/\[(?<alt>[^\]]+)\]\([^)]+\)/g, (match, p1) => p1);
|
||||
return line.replace(
|
||||
/\[(?<alt>[^\]]+)\]\([^)]+\)/g,
|
||||
(match, p1: string) => p1,
|
||||
);
|
||||
}
|
||||
|
||||
function addHeadingId(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue