Add a min
or minLength
option so only arrays from a certain known size will be linted (default 0).
The rule can sometimes be too strict, using sets over arrays is usually more performant the more elements it has, and it's negligible in small numbers and readability is preferred.
min: 5
const array = [1, 2, 3, 4, 5, 6, 7];
const hasValue = value => array.includes(value);
min: 5
const array = [1, 2];
const hasValue = value => array.includes(value);
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