Skip to content

Commit f2067c1

Browse files
authored
chore: log error details on --debug flag enabled (#511)
1 parent 9633772 commit f2067c1

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 { message, line, column, place } = err as VFileMessage
6670
const point = place && ('start' in place ? place.start : place)
6771
throw Object.assign(

0 commit comments

Comments
 (0)