Some people seem to like building up an Array
, by starting with an empty list and calling concat()
with extra items.
A trivial minimal reproduction would look like this:
const a = [].concat([1]).concat([2]);
When you apply the autofix, it comes out like this, which is clearly nonsense.
const a = [[1]].flat().concat([2])
It seems the intent of the rule is to stop me using some arcane technique to flatten arrays, but the developers intent here is just to build up a flat list of entries rather than to flatten an Array
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too