-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(eslint): Enable and auto-fix prefer-array-index-of
#88047
Conversation
// @ts-expect-error: Mismatched types | ||
const tokenIndex = filterTokens.indexOf(token); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a type error here i didn't dig into, the type of token
is huge.
That the types don't match might indicate an (existing?) problem
Is there a functional difference between these two or is it more stylistic? Contrast this to #88049 where it's objectively + functionally better (and subjectively, stylistically better imo) |
They should be functionally the same. The changes were made but an auto-fix rule, so i put some trust in that when i chose to turn this on. The docs for each method are here: I'll call out that I think in terms of types TS is doing a better job now, which is why I stomped on some violations that popped up. |
No description provided.