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 1, 2024
1 parent 9633772 commit f2067c1
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
@@ -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
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 { message, line, column, place } = err as VFileMessage
const point = place && ('start' in place ? place.start : place)
throw Object.assign(
Expand Down

0 comments on commit f2067c1

Please sign in to comment.