Array#flatMap
performs Array#map
and Array#flat
in one step.
This rule is fixable.
[1, 2, 3].map(i => [i]).flat();
[].concat(...foo.map((i) => i))
[1, 2, 3].flatMap(i => [i]);
[1, 2, 3].map(i => [i]).foo().flat();
Array#flatMap
performs Array#map
and Array#flat
in one step.
This rule is fixable.
[1, 2, 3].map(i => [i]).flat();
[].concat(...foo.map((i) => i))
[1, 2, 3].flatMap(i => [i]);
[1, 2, 3].map(i => [i]).foo().flat();