-
-
Notifications
You must be signed in to change notification settings - Fork 950
prefer-array-flat-map false positives for React.children #13531
Copy link
Copy link
Labels
A-linterArea - LinterArea - Linter
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-linterArea - LinterArea - Linter
Type
Fields
Give feedbackPriority
None yet
Effort
None yet