prefer-loop-condition Prefer loop conditions over leading conditional breaks A leading conditional break makes readers inspect the loop body to discover its primary continuation condition. Instead, you SHOULD place the complemented condition in a while header when the test occurs before every iteration body. - Category: style - Level: warning - Fix: suggestion - Scope: module Reported declare function isDone(): boolean; declare function work(): void; loop { if (isDone()) { break; } work(); } Accepted declare function isDone(): boolean; declare function work(): void; while (!isDone()) { work(); } Prior art - eslint-plugin-unicorn ยท prefer-while-loop-condition language/linter/src/rules/style/preferloopcondition.rs:8