refactor: clear a few ESLint warnings (#5808)

* refactor: clear a few ESLint warnings

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Fix
This commit is contained in:
Joshua Chen 2021-10-28 12:47:40 +08:00 committed by GitHub
parent 68c970175a
commit 4b2152a964
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 35 additions and 26 deletions

View file

@ -181,9 +181,9 @@ export async function parseMarkdownFile(
const markdownString = await fs.readFile(source, 'utf-8');
try {
return parseMarkdownString(markdownString, options);
} catch (e: any) {
} catch (e) {
throw new Error(
`Error while parsing Markdown file ${source}: "${e.message}".`,
`Error while parsing Markdown file ${source}: "${(e as Error).message}".`,
);
}
}