---
source: crates/oxc_linter/src/tester.rs
expression: no_useless_length_check
---
  ⚠ eslint-plugin-unicorn(no-useless-length-check)
   ╭─[no_useless_length_check.tsx:1:1]
 1 │ array.length === 0 || array.every(Boolean)
   · ──────────────────
   ╰────
  help: The empty check is useless as `Array#every()` returns `true` for an empty array.

  ⚠ eslint-plugin-unicorn(no-useless-length-check)
   ╭─[no_useless_length_check.tsx:1:1]
 1 │ array.length > 0 && array.some(Boolean)
   · ────────────────
   ╰────
  help: The non-empty check is useless as `Array#some()` returns `false` for an empty array.

  ⚠ eslint-plugin-unicorn(no-useless-length-check)
   ╭─[no_useless_length_check.tsx:1:1]
 1 │ array.length !== 0 && array.some(Boolean)
   · ──────────────────
   ╰────
  help: The non-empty check is useless as `Array#some()` returns `false` for an empty array.

  ⚠ eslint-plugin-unicorn(no-useless-length-check)
   ╭─[no_useless_length_check.tsx:1:1]
 1 │ if ((( array.length > 0 )) && array.some(Boolean));
   ·        ────────────────
   ╰────
  help: The non-empty check is useless as `Array#some()` returns `false` for an empty array.

  ⚠ eslint-plugin-unicorn(no-useless-length-check)
   ╭─[no_useless_length_check.tsx:1:1]
 1 │ (array.length === 0 || array.every(Boolean)) || foo
   ·  ──────────────────
   ╰────
  help: The empty check is useless as `Array#every()` returns `true` for an empty array.

  ⚠ eslint-plugin-unicorn(no-useless-length-check)
   ╭─[no_useless_length_check.tsx:1:1]
 1 │ (array.length === 0 || array.every(Boolean)) || foo
   ·  ──────────────────
   ╰────
  help: The empty check is useless as `Array#every()` returns `true` for an empty array.

  ⚠ eslint-plugin-unicorn(no-useless-length-check)
   ╭─[no_useless_length_check.tsx:1:1]
 1 │ foo || (array.length === 0 || array.every(Boolean))
   ·         ──────────────────
   ╰────
  help: The empty check is useless as `Array#every()` returns `true` for an empty array.

  ⚠ eslint-plugin-unicorn(no-useless-length-check)
   ╭─[no_useless_length_check.tsx:1:1]
 1 │ foo || (array.length === 0 || array.every(Boolean))
   ·         ──────────────────
   ╰────
  help: The empty check is useless as `Array#every()` returns `true` for an empty array.

  ⚠ eslint-plugin-unicorn(no-useless-length-check)
   ╭─[no_useless_length_check.tsx:1:1]
 1 │ (array.length > 0 && array.some(Boolean)) && foo
   ·  ────────────────
   ╰────
  help: The non-empty check is useless as `Array#some()` returns `false` for an empty array.

  ⚠ eslint-plugin-unicorn(no-useless-length-check)
   ╭─[no_useless_length_check.tsx:1:1]
 1 │ (array.length > 0 && array.some(Boolean)) && foo
   ·  ────────────────
   ╰────
  help: The non-empty check is useless as `Array#some()` returns `false` for an empty array.

  ⚠ eslint-plugin-unicorn(no-useless-length-check)
   ╭─[no_useless_length_check.tsx:1:1]
 1 │ foo && (array.length > 0 && array.some(Boolean))
   ·         ────────────────
   ╰────
  help: The non-empty check is useless as `Array#some()` returns `false` for an empty array.

  ⚠ eslint-plugin-unicorn(no-useless-length-check)
   ╭─[no_useless_length_check.tsx:1:1]
 1 │ foo && (array.length > 0 && array.some(Boolean))
   ·         ────────────────
   ╰────
  help: The non-empty check is useless as `Array#some()` returns `false` for an empty array.

  ⚠ eslint-plugin-unicorn(no-useless-length-check)
   ╭─[no_useless_length_check.tsx:1:1]
 1 │ array.every(Boolean) || array.length === 0
   ·                         ──────────────────
   ╰────
  help: The empty check is useless as `Array#every()` returns `true` for an empty array.

  ⚠ eslint-plugin-unicorn(no-useless-length-check)
   ╭─[no_useless_length_check.tsx:1:1]
 1 │ array.some(Boolean) && array.length !== 0
   ·                        ──────────────────
   ╰────
  help: The non-empty check is useless as `Array#some()` returns `false` for an empty array.

  ⚠ eslint-plugin-unicorn(no-useless-length-check)
   ╭─[no_useless_length_check.tsx:1:1]
 1 │ array.some(Boolean) && array.length > 0
   ·                        ────────────────
   ╰────
  help: The non-empty check is useless as `Array#some()` returns `false` for an empty array.

  ⚠ eslint-plugin-unicorn(no-useless-length-check)
   ╭─[no_useless_length_check.tsx:1:1]
 1 │ foo && array.length > 0 && array.some(Boolean)
   ·        ────────────────
   ╰────
  help: The non-empty check is useless as `Array#some()` returns `false` for an empty array.

  ⚠ eslint-plugin-unicorn(no-useless-length-check)
   ╭─[no_useless_length_check.tsx:1:1]
 1 │ foo || array.length === 0 || array.every(Boolean)
   ·        ──────────────────
   ╰────
  help: The empty check is useless as `Array#every()` returns `true` for an empty array.

  ⚠ eslint-plugin-unicorn(no-useless-length-check)
   ╭─[no_useless_length_check.tsx:1:1]
 1 │ (foo || array.length === 0) || array.every(Boolean)
   ·         ──────────────────
   ╰────
  help: The empty check is useless as `Array#every()` returns `true` for an empty array.

  ⚠ eslint-plugin-unicorn(no-useless-length-check)
   ╭─[no_useless_length_check.tsx:1:1]
 1 │ array.length === 0 || (array.every(Boolean) || foo)
   · ──────────────────
   ╰────
  help: The empty check is useless as `Array#every()` returns `true` for an empty array.

  ⚠ eslint-plugin-unicorn(no-useless-length-check)
   ╭─[no_useless_length_check.tsx:1:1]
 1 │ (foo && array.length > 0) && array.some(Boolean)
   ·         ────────────────
   ╰────
  help: The non-empty check is useless as `Array#some()` returns `false` for an empty array.

  ⚠ eslint-plugin-unicorn(no-useless-length-check)
   ╭─[no_useless_length_check.tsx:1:1]
 1 │ array.length > 0 && (array.some(Boolean) && foo)
   · ────────────────
   ╰────
  help: The non-empty check is useless as `Array#some()` returns `false` for an empty array.

  ⚠ eslint-plugin-unicorn(no-useless-length-check)
   ╭─[no_useless_length_check.tsx:1:1]
 1 │ array.every(Boolean) || array.length === 0 || array.every(Boolean)
   ·                         ──────────────────
   ╰────
  help: The empty check is useless as `Array#every()` returns `true` for an empty array.

  ⚠ eslint-plugin-unicorn(no-useless-length-check)
   ╭─[no_useless_length_check.tsx:1:1]
 1 │ array.every(Boolean) || array.length === 0 || array.every(Boolean)
   ·                         ──────────────────
   ╰────
  help: The empty check is useless as `Array#every()` returns `true` for an empty array.

  ⚠ eslint-plugin-unicorn(no-useless-length-check)
   ╭─[no_useless_length_check.tsx:1:1]
 1 │ array.every(Boolean) || array.length === 0 || array.every(Boolean)
   ·                         ──────────────────
   ╰────
  help: The empty check is useless as `Array#every()` returns `true` for an empty array.

  ⚠ eslint-plugin-unicorn(no-useless-length-check)
   ╭─[no_useless_length_check.tsx:1:1]
 1 │ array.length === 0 || array.every(Boolean) || array.length === 0
   · ──────────────────
   ╰────
  help: The empty check is useless as `Array#every()` returns `true` for an empty array.

  ⚠ eslint-plugin-unicorn(no-useless-length-check)
   ╭─[no_useless_length_check.tsx:1:1]
 1 │ array.length === 0 || array.every(Boolean) || array.length === 0
   ·                                               ──────────────────
   ╰────
  help: The empty check is useless as `Array#every()` returns `true` for an empty array.

  ⚠ eslint-plugin-unicorn(no-useless-length-check)
   ╭─[no_useless_length_check.tsx:1:1]
 1 │ array.length === 0 || array.every(Boolean) || array.length === 0
   · ──────────────────
   ╰────
  help: The empty check is useless as `Array#every()` returns `true` for an empty array.


