---
source: crates/oxc_linter/src/tester.rs
expression: uninvoked_array_callback
---
  ⚠ deepscan(uninvoked-array-callback): Uninvoked array callback
   ╭─[uninvoked_array_callback.tsx:1:1]
 1 │ const list = new Array(5).map(_ => {})
   ·              ──────┬───── ─┬─
   ·                    │       ╰── this callback will not be invoked
   ·                    ╰── because this is an array with only empty slots
   ╰────
  help: consider filling the array with `undefined` values using `Array.prototype.fill()`

  ⚠ deepscan(uninvoked-array-callback): Uninvoked array callback
   ╭─[uninvoked_array_callback.tsx:1:1]
 1 │ const list = new Array(5).filter(function(_) {})
   ·              ──────┬───── ───┬──
   ·                    │         ╰── this callback will not be invoked
   ·                    ╰── because this is an array with only empty slots
   ╰────
  help: consider filling the array with `undefined` values using `Array.prototype.fill()`

  ⚠ deepscan(uninvoked-array-callback): Uninvoked array callback
   ╭─[uninvoked_array_callback.tsx:1:1]
 1 │ const list = new Array(5)['every'](function(_) {})
   ·              ──────┬───── ───┬───
   ·                    │         ╰── this callback will not be invoked
   ·                    ╰── because this is an array with only empty slots
   ╰────
  help: consider filling the array with `undefined` values using `Array.prototype.fill()`


