Editor incorrectly identifies comments in JSX
- Dominant language
- TypeScript
- Stars
- 510
- Forks
- 178
- Avg merge
- 5h 7m
- Merged PRs (30d)
- 5
Description
If you comment a line of JSX using `//` or a block using `/* ... */` it renders as a comment (greyed out) in the editor, but it is not treated as a comment by the framework. Moreover, if you use a keyboard shortcut (ex: `Command+/` on macOS) to comment out a selection or current line, the editor will insert `//` which again does not make a valid comment.
See screenshot where a line 16 appears commented out but isn't actually.
Expected: Apparently comments in JSX need to be delineated with `{/* ... */}` and anything else should not be rendered greyed out.

Contributor guide
Research direction
Start by reproducing the issue in the editor with JSX lines using //, /* ... */, and the Command+/ shortcut. Inspect the editor behavior for comment highlighting and shortcut insertion; done means only {/* ... */} is treated as a JSX comment and the shortcut produces valid JSX comments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100