Not a new rule, but there may be benefits to allow users to set a maximum amount of destructurings before this rule triggers, in my case we access the 3rd
argument in certain destructions quite excessively and I assume others had the same issue.
I'd propose something like: "unicorn/no-unreadable-array-destructuring": ["error", { limit: 2 }]
.
I understand there is potential to 'abuse' this limit and just keep pushing it, it might be prudent to set a hard-limit of ~5 or so unused destructurings to avoid heavy confusion with spread operators.
/* eslint unicorn/no-unreadable-array-destructuring: ["error"] */
const [,,v] = hsvString.split(',')
/* eslint unicorn/no-unreadable-array-destructuring: ["error", { limit: 2 }] */
const [,,v] = hsvString.split(',')
No response
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