diff --git a/.changeset/poor-lions-buy.md b/.changeset/poor-lions-buy.md new file mode 100644 index 0000000..23e5cbe --- /dev/null +++ b/.changeset/poor-lions-buy.md @@ -0,0 +1,5 @@ +--- +"eslint-mdx": patch +--- + +chore: log error details on `--debug` flag enabled diff --git a/packages/eslint-mdx/src/parser.ts b/packages/eslint-mdx/src/parser.ts index 1b373c3..8984515 100644 --- a/packages/eslint-mdx/src/parser.ts +++ b/packages/eslint-mdx/src/parser.ts @@ -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, {