💅 noCommentText does not work when any other text is a child #3298
Labels
A-Linter
Area: linter
L-JavaScript
Language: JavaScript and super languages
S-Bug-confirmed
Status: report has been confirmed as a valid bug
Environment information
Rule name
noCommentText
Playground link
https://biomejs.dev/playground/?lineWidth=120&indentStyle=space&lintRules=all&code=ZQB4AHAAbwByAHQAIABjAG8AbgBzAHQAIABjADMAIAA9ACAAKAApACAAPQA%2BACAAewAKACAAIAByAGUAdAB1AHIAbgAgACgACgAgACAAIAAgADwAZABpAHYAPgAKACAAIAAgACAAIAAgADEAMgAzAAoAIAAgACAAIAAgACAALwAvACAAYQBiAGMACgAgACAAIAAgADwALwBkAGkAdgA%2BAAoAIAAgACkACgB9AAoACgBlAHgAcABvAHIAdAAgAGMAbwBuAHMAdAAgAGMANAAgAD0AIAA8AGQAaQB2AD4AIAAvAC8AIABhAGIAYwA8AC8AZABpAHYAPgAKAAoAZQB4AHAAbwByAHQAIABjAG8AbgBzAHQAIABjADUAIAA9ACAAPABkAGkAdgA%2BAAoAIAAgADwAYgByACAALwA%2BAAoAIAAgAC8ALwAgAGEAYgBjAAoAPAAvAGQAaQB2AD4A
Expected result
Should show an error when text and comment is present (including multiline).
I'm not exactly sure of the desired behavior here, but I noticed eslint-plugin-react shows an error for multi-line children with a comment and biome does not.
Is it expected that all comments within children that are not wrapped in
{}
should show an error or just when they are the only child?Code of Conduct
The text was updated successfully, but these errors were encountered: