---
source: crates/oxc_linter/src/tester.rs
expression: jsx_no_comment_textnodes
---
  ⚠ eslint-plugin-react(jsx-no-comment-textnodes): Comments inside children section of tag should be placed inside braces
   ╭─[jsx_no_comment_textnodes.tsx:4:29]
 3 │                       render() {
 4 │                         return (<div>// invalid</div>);
   ·                                      ──────────
 5 │                       }
   ╰────

  ⚠ eslint-plugin-react(jsx-no-comment-textnodes): Comments inside children section of tag should be placed inside braces
   ╭─[jsx_no_comment_textnodes.tsx:4:26]
 3 │                       render() {
 4 │                         return (<>// invalid</>);
   ·                                   ──────────
 5 │                       }
   ╰────

  ⚠ eslint-plugin-react(jsx-no-comment-textnodes): Comments inside children section of tag should be placed inside braces
   ╭─[jsx_no_comment_textnodes.tsx:4:29]
 3 │                       render() {
 4 │                         return (<div>/* invalid */</div>);
   ·                                      ─────────────
 5 │                       }
   ╰────

  ⚠ eslint-plugin-react(jsx-no-comment-textnodes): Comments inside children section of tag should be placed inside braces
   ╭─[jsx_no_comment_textnodes.tsx:5:23]
 4 │                             return (
 5 │ ╭─▶                           <div>
 6 │ │                               // invalid
 7 │ ╰─▶                           </div>
 8 │                             );
   ╰────

  ⚠ eslint-plugin-react(jsx-no-comment-textnodes): Comments inside children section of tag should be placed inside braces
    ╭─[jsx_no_comment_textnodes.tsx:5:23]
  4 │                             return (
  5 │ ╭─▶                           <div>
  6 │ │                               asdjfl
  7 │ │                               /* invalid */
  8 │ │                               foo
  9 │ ╰─▶                           </div>
 10 │                             );
    ╰────

  ⚠ eslint-plugin-react(jsx-no-comment-textnodes): Comments inside children section of tag should be placed inside braces
   ╭─[jsx_no_comment_textnodes.tsx:6:30]
 5 │                               <div>
 6 │ ╭─▶                             {'asdjfl'}
 7 │ │                               // invalid
 8 │ ╰─▶                             {'foo'}
 9 │                               </div>
   ╰────

  ⚠ eslint-plugin-react(jsx-no-comment-textnodes): Comments inside children section of tag should be placed inside braces
   ╭─[jsx_no_comment_textnodes.tsx:3:27]
 2 │                     const Component2 = () => {
 3 │                       return <span>/*</span>;
   ·                                    ──
 4 │                     };
   ╰────
