Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use when auditing tsconfig.json for missing safety flags, reviewing code that uses array index access in data processing pipelines, or investigating runtime undefined errors that TypeScript did not catch.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-13 | ✗→✓ | ▲ Improved | -16% | 0% |
| case-21 | ✗→✓ | ▲ Improved | 9% | 0% |
| case-01 | ✓→✓ | = Same ✓ | 148% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 46% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 83% | 0% |
TypeScript's default behaviour types array[0] as T, pretending the access is always safe. In reality, the array might be empty or the index might be out of range, leading to silent undefined values that cause downstream crashes. Enabling noUncheckedIndexedAccess surfaces these potential failures as type errors at compile time, requiring developers to prove the access is safe before the code runs.
Check whether noUncheckedIndexedAccess is enabled in the project's tsconfig.json. If not, scan for array index accesses (arr0], arri]) that could fail if the array is shorter than expected.
Enable noUncheckedIndexedAccess in tsconfig.json, then update any array index accesses that TypeScript now flags to include an explicit undefined check or use optional chaining before the accessed value is used.
Explain what noUncheckedIndexedAccess does, why the default TypeScript behaviour is unsound for array index access, and how optional chaining and Array.at() interact with the flag.
Review all array index accesses in this file (arr0], arri], objectkey]). Flag any location where the accessed value is used without a preceding undefined check, even if noUncheckedIndexedAccess is not yet enabled in the project.
For full implementation details, code examples, and framework-specific guidance, see references/rule.md.
Rule page: https://frontendchecklist.io/en/rules/javascript/no-unchecked-indexed-access
Other measured skills in the registry, with their headline benchmark lift.