When "autofixing" an array to a set, the type definition should be fixed too (or the fix should be skipped).
prefer-set-has
const a: Array<'foo' | 'bar'> = ['foo', 'bar']
for (let i = 0; i < 3; i++) {
if (a.includes(someString)) {
console.log(123)
}
}
This is corrected to:
const a: Array<'foo' | 'bar'> = new Set(['foo', 'bar'])
for (let i = 0; i < 3; i++) {
if (a.has(someString)) {
console.log(123)
}
}
Which is confusing and wrong.
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