no-useless-length-check Disallow length checks duplicated by the guarded array operation every returns true for an empty array, and some returns false. Separate length guards duplicate these results. Instead, you SHOULD use the array operation directly. - Category: suspicious - Level: warning - Fix: automatic - Scope: module Reported function allPositive(values: int32[]): boolean { return values.length === 0 || values.every((value) => value > 0); } Accepted function allPositive(values: int32[]): boolean { return values.every((value) => value > 0); } Prior art - eslint-plugin-unicorn ยท no-useless-length-check language/linter/src/rules/suspicious/nouselesslengthcheck.rs:8