Filter by tag:
TypeScript/JavaScript
npmeslint
eslint-plugin-no-in-arrayPublished to
Type-aware ESLint rule that detects misuse of the in operator with arrays in TypeScript.
The in operator checks for property keys, not values — causing subtle bugs:
typescript
1"a" in ["a", "b", "c"]; // false! indices are "0", "1", "2"
Use .includes() instead. This plugin catches arrays, tuples, readonly arrays, and inline literals.
av
Anton VeretennikovPersonal Landing Page