We are going to add prefer-object-from-entries
rule in #1308. As proposed in the original proposal, the following case should be reported too
const foo = {};
for (const [key, value] of pairs) {
foo[key] = value;
}
But it's complicated, and I can't find a good solution for it. Opening this issue to keep track of it.
Note: As we agreed, we should only report cases that array is already key-value pairs, so it won't need a .map
transform, see #1308 (comment)
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