--- source: crates/biome_js_analyze/tests/spec_tests.rs expression: invalid.tsx --- # Input ```tsx const a3 =
// comment
; const a4 =
/* comment */
; const a5 =
/** comment */
; ``` # Diagnostics ``` invalid.tsx:1:17 lint/suspicious/noCommentText FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Wrap comments inside children within braces. > 1 │ const a3 =
// comment
; │ ^^^^^^^^^^ 2 │ const a4 =
/* comment */
; 3 │ const a5 =
/** comment */
; i Unsafe fix: Wrap the comments with braces 1 │ - const·a3·=·
//·comment
; 1 │ + const·a3·=·
{/*·comment*/}
; 2 2 │ const a4 =
/* comment */
; 3 3 │ const a5 =
/** comment */
; ``` ``` invalid.tsx:2:17 lint/suspicious/noCommentText FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Wrap comments inside children within braces. 1 │ const a3 =
// comment
; > 2 │ const a4 =
/* comment */
; │ ^^^^^^^^^^^^^ 3 │ const a5 =
/** comment */
; i Unsafe fix: Wrap the comments with braces 2 │ const·a4·=·
{/*·comment·*/}
; │ + + ``` ``` invalid.tsx:3:17 lint/suspicious/noCommentText FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Wrap comments inside children within braces. 1 │ const a3 =
// comment
; 2 │ const a4 =
/* comment */
; > 3 │ const a5 =
/** comment */
; │ ^^^^^^^^^^^^^^ i Unsafe fix: Wrap the comments with braces 1 1 │ const a3 =
// comment
; 2 2 │ const a4 =
/* comment */
; 3 │ - const·a5·=·
/**·comment·*/
; 3 │ + const·a5·=·
{/*·comment·*/}
; ```