Closed
Description
openedon Dec 28, 2020
I think
const [r0] = r;
is less preferable than
const r0 = r[0];
and even if not, it doesn't buy anything. Also, while we should transition to ES2015, I don't see a reason for practically enforcing ES2015-only constructs, and currently, the resulting polyfill, where an ES5 construct exists which is often no worse and sometimes better.
I'm eager to learn if there's some justification. The rule description itself lists no benefits but points to clear drawbacks eg. when indexing arrays. I'm not fond of raising an info or warning for language constructs that seem perfectly legit, so such rules should ideally be activated upon shared conviction.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment