An arrow function only passes its parameter to Number, String or Boolean, which can be passed directly
What it finds
values.map((v) => Number(v)) wraps a function that takes one argument in another that does nothing more; values.map(Number) passes it directly.
Reported are arrow functions with one parameter whose body only calls Number, String, Boolean or BigInt with that parameter, given as an argument.
From the rule's source, conversion_wrapped_in_arrow.rs.
export const numbers = (values: string[]) => values.map((v) => Number(v));tx0 reports: this arrow only calls Number Turn it on, off or suppress it
The rule runs from the all tier up. To turn it on in a lower tier, give it a level in tx0.toml:
[rules]
"tx0/ts:conversion-wrapped-in-arrow" = "warning"To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:
// tx0: ignore[tx0/ts:conversion-wrapped-in-arrow] reason="..."tx0 explain tx0/ts:conversion-wrapped-in-arrow shows the same in the terminal. Found a false positive? Report it.