JSX syntax is framework-agnostic and not specific to react (for example vue supports it too), so it should be handled as part of the regular javascript lexer, like already the case in the typescript lexer. Ideally even go a step further and share the JSX lexer for both javascript and typescript because semantics are the same in both.
JSX highlighting should work on .js files as well as in some (mostly legacy) cases, JSX could appear in such files as well.
What problem does this feature solve?
JSX syntax is framework-agnostic and not specific to react (for example vue supports it too), so it should be handled as part of the regular javascript lexer, like already the case in the typescript lexer. Ideally even go a step further and share the JSX lexer for both javascript and typescript because semantics are the same in both.
JSX highlighting should work on
.js
files as well as in some (mostly legacy) cases, JSX could appear in such files as well.