jsx_tag_auto_close: Fix <Foo.Bar> component auto-close (#27374)

- **support alternate tag name node names to fix autoclosing of
`<Foo.Bar>` style tags in TSX**
- **remove checks against close tag name while checking if tag is
closed**
- **move jsx tag auto close tests into jsx_tag_auto_close.rs**

Closes #27335

Release Notes:

- Fixed an issue with JSX tag auto-close where components containing a
`.` access like `<Foo.Bar>` would be auto-closed as `</>` instead of
`</Foo.Bar>`
This commit is contained in:
Ben Kunkle 2025-03-24 10:43:06 -05:00 committed by GitHub
parent 43712285bf
commit f2be201495
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 271 additions and 257 deletions

View file

@ -23,6 +23,7 @@ open_tag_node_name = "jsx_opening_element"
close_tag_node_name = "jsx_closing_element"
jsx_element_node_name = "jsx_element"
tag_name_node_name = "identifier"
tag_name_node_name_alternates = ["member_expression"]
[overrides.element]
line_comments = { remove = true }