Skip to content

Commit

Permalink
fix: incorrect jsx attribute name AST (#425)
Browse files Browse the repository at this point in the history
Co-authored-by: JounQin <[email protected]>
  • Loading branch information
chenxsan and JounQin authored Sep 7, 2022
1 parent c8d38ee commit fb3f154
Show file tree
Hide file tree
Showing 3 changed files with 226 additions and 236 deletions.
5 changes: 5 additions & 0 deletions .changeset/light-crabs-obey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'eslint-mdx': patch
---

fix: incorrect jsx attribute `name` AST
4 changes: 2 additions & 2 deletions packages/eslint-mdx/src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ runAsWorker(

if (attrValue == null) {
return {
...attrNamePos,
...normalizeNode(attrStart, lastAttrOffset + 1),
type: 'JSXAttribute',
name: {
...attrNamePos,
Expand Down Expand Up @@ -499,7 +499,7 @@ runAsWorker(
...attrNamePos,
type: 'JSXAttribute',
name: {
...normalizeNode(attrStart, lastAttrOffset + 1),
...attrNamePos,
type: 'JSXIdentifier',
name: attrName,
},
Expand Down
Loading

0 comments on commit fb3f154

Please sign in to comment.