-### `MDXJSXHeading`
+### `MDXHeading`
-A new `MDXJSXHeading` estree node type is exported from `eslint-mdx` which represents code blocks in `mdx` like the following:
+A new `MDXHeading` estree node type is exported from `eslint-mdx` which represents code blocks in `mdx` like the following:
```mdx
@@ -181,8 +181,8 @@ See also
import type { BaseNode } from 'estree'
import type { JSXElement } from 'estree-jsx'
-export interface MDXJSXCode extends BaseNode {
- type: 'MDXJSXCode'
+export interface MDXCode extends BaseNode {
+ type: 'MDXCode'
value: string
lang?: string | null
meta?: string | null
@@ -190,8 +190,8 @@ export interface MDXJSXCode extends BaseNode {
export type HeadingDepth = 1 | 2 | 3 | 4 | 5 | 6
-export interface MDXJSXHeading extends BaseNode {
- type: 'MDXJSXHeading'
+export interface MDXHeading extends BaseNode {
+ type: 'MDXHeading'
depth: HeadingDepth
children: JSXElement['children']
}
diff --git a/test/__snapshots__/parser.test.ts.snap b/test/__snapshots__/parser.test.ts.snap
index e7ac9a3..0b3cb3e 100644
--- a/test/__snapshots__/parser.test.ts.snap
+++ b/test/__snapshots__/parser.test.ts.snap
@@ -3534,7 +3534,7 @@ function foo() {
}
\`\`\`",
"start": 24,
- "type": "MDXJSXCode",
+ "type": "MDXCode",
"value": "function foo() {
return 123;
}",
@@ -40966,7 +40966,7 @@ exports[`parser should match all AST snapshots: blank-lines.mdx 1`] = `
],
"raw": "# Here's a text gradient shortcode!",
"start": 651,
- "type": "MDXJSXHeading",
+ "type": "MDXHeading",
},
],
"closingElement": {