handle jsx components with dot in them

This commit is contained in:
davidroeca 2020-10-20 12:10:50 -04:00 committed by Kiyan Yazdani
parent 2a578e20c2
commit dafe947ecd

View file

@ -11,18 +11,27 @@
(jsx_closing_element
name: (identifier) @tag)
(jsx_self_closing_element
(jsx_self_closing_element
name: (identifier) @tag)
(jsx_opening_element ((identifier) @type
(#match? @type "^[A-Z]")))
; Handle the dot operator effectively - <My.Component>
(jsx_opening_element ((nested_identifier (identifier) @type (identifier) @type)))
(jsx_closing_element ((identifier) @type
(#match? @type "^[A-Z]")))
; Handle the dot operator effectively - </My.Component>
(jsx_closing_element ((nested_identifier (identifier) @type (identifier) @type)))
(jsx_self_closing_element ((identifier) @type
(#match? @type "^[A-Z]")))
; Handle the dot operator effectively - <My.Component />
(jsx_self_closing_element ((nested_identifier (identifier) @type (identifier) @type)))
(variable_declarator ((identifier) @type
(#match? @type "^[A-Z]")))