mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-12 03:49:43 +02:00
chore: Add type checked rules, auto fix
This commit is contained in:
@@ -88,9 +88,9 @@ const WARN_DOCSDIR_DOESNT_MATCH = `Changed files were transformed in ${SOURCE_DO
|
||||
const prettierConfig = (await prettier.resolveConfig('.')) ?? {};
|
||||
// From https://github.com/vuejs/vitepress/blob/428eec3750d6b5648a77ac52d88128df0554d4d1/src/node/markdownToVue.ts#L20-L21
|
||||
const includesRE = /<!--\s*@include:\s*(.*?)\s*-->/g;
|
||||
const includedFiles: Set<string> = new Set();
|
||||
const includedFiles = new Set<string>();
|
||||
|
||||
const filesTransformed: Set<string> = new Set();
|
||||
const filesTransformed = new Set<string>();
|
||||
|
||||
const generateHeader = (file: string): string => {
|
||||
// path from file in docs/* to repo root, e.g ../ or ../../ */
|
||||
@@ -201,6 +201,7 @@ const transformIncludeStatements = (file: string, text: string): string => {
|
||||
includedFiles.add(changeToFinalDocDir(includePath));
|
||||
return content;
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
||||
throw new Error(`Failed to resolve include "${m1}" in "${file}": ${error}`);
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user