The rule description states:
Enforces the use of already destructured objects and their variables over accessing each property individually. Previous destructurings are easily missed which leads to an inconsistent code style.
However, the rule fails also when objects were not and cannot be destructed:
const t = { a: { b: { c: 0, d: 1, e: 2 } } };
const {
a: {
b: { c, ...other },
},
} = t;
const tt = { ...t, a: { ...t.a, b: other } };
In this case, a rule reports that t.a
should use destructed variables. But a
is not defined, as it is further destructed.
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