<!-- style comments not recognized when parsing JSX
See original GitHub issueEvidently <!-- ...
single-line comments are valid in JavaScript. eslint doesn’t seem to recognize this.
Source: https://twitter.com/bterlson/status/768211703314067457 and http://www.ecma-international.org/ecma-262/7.0/index.html#prod-annexB-SingleLineHTMLOpenComment
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:11 (10 by maintainers)
Top Results From Across the Web
How to use comments in React - Stack Overflow
Within React(JSX), you can use {/* comment here */} , however for javascript // comment here works. So, the answer depends on where...
Read more >How to comment in React JSX - Wes Bos
Regular JavaScript comments in JSX get parsed as Text and show up in your app. Comments in JSX are weird and when searching...
Read more >React Native Comments - 2 Ways to Add Comments in JSX
Adding a comment in React Native code is not difficult but it's weird. ... Regular JavaScript comments in JSX get parsed as Text....
Read more >babel/parser
The Babel parser (previously Babylon) is a JavaScript parser used in Babel. ... When this option is set to false , comments are...
Read more >Documentation - JSX - TypeScript
createElement , does not need to go through a JSX transformation before use, ... and is identical in behavior to the angle-bracket type...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I opened the issue: https://github.com/RReverser/acorn-jsx/issues/41
I got a fact that HTML comments trigger a syntax error if it’s using JSX option. I reopen this issue.
no errors