jsx-no-comment-text-nodes
NOTE: this rule is included the following rule sets:
recommended
react
jsx
fresh
Enable full set in
deno.json
:{ "lint": { "rules": { "tags": ["recommended"] // ...or "react", "jsx", "fresh" } } }
Enable full set using the Deno CLI:
deno lint --rules-tags=recommended # or ... deno lint --rules-tags=react # or ... deno lint --rules-tags=jsx # or ... deno lint --rules-tags=fresh
JavaScript comments inside text nodes are rendered as plain text in JSX. This is often unexpected.
Invalid:
<div>// comment</div>
<div>/* comment */</div>
Valid:
<div>{/* comment */}</div>;