Metaculus / metaculus

https://www.metaculus.com
BSD 2-Clause "Simplified" License
54 stars 12 forks source link

Improve TypeScript rules to enforce unchecked indexes check #1469

Open ncarazon opened 1 day ago

ncarazon commented 1 day ago

Current behavior

We currently don't require checking for nullable state when accessing a value by index, which may result in an error if not handled properly.

Expected/desired behavior

Enable noUncheckedIndexedAccess in ts config and update the codebase to gracefully handle nullable values.