Skip to content

Commit 6913aa1

Browse files
committed
chore: log error details on --debug flag enabled (#511)
1 parent 30f1b90 commit 6913aa1

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.changeset/poor-lions-buy.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"eslint-mdx": patch
3+
---
4+
5+
chore: log error details on `--debug` flag enabled

packages/eslint-mdx/src/parser.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ export class Parser {
6262
ignoreRemarkConfig,
6363
})
6464
} catch (err: unknown) {
65+
/* istanbul ignore if */
66+
if (process.argv.includes('--debug')) {
67+
console.error(err)
68+
}
6569
const error = err as VFileMessage
6670
throw Object.assign(
6771
new SyntaxError(error.message, {

0 commit comments

Comments
 (0)