Latest oxlint. When applying auto-fix for prefer-array-flat-map introduces false positives for React.Children.
React.Children.map(props.children, child => {
if (typeof child === "string") {
return child.split("+");
}
return "";
})
?.flat()
ends up as
React.Children.flatMap(props.children, child => {
if (typeof child === "string") {
return child.split("+");
}
return "";
})
Note that React.Children is not an array.