Skip to content

Commit

Permalink
chore: log error details on --debug flag enabled (#511)
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Jan 2, 2024
1 parent 30f1b90 commit 6913aa1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/poor-lions-buy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"eslint-mdx": patch
---

chore: log error details on `--debug` flag enabled
4 changes: 4 additions & 0 deletions packages/eslint-mdx/src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ export class Parser {
ignoreRemarkConfig,
})
} catch (err: unknown) {
/* istanbul ignore if */
if (process.argv.includes('--debug')) {
console.error(err)
}
const error = err as VFileMessage
throw Object.assign(
new SyntaxError(error.message, {
Expand Down

0 comments on commit 6913aa1

Please sign in to comment.