prefer-expect-diagnostic Prefer diagnostic expectations for local suppressions A local @allow remains valid after the suppressed diagnostic disappears. Instead, you SHOULD use @expect for an intentional diagnostic so its disappearance is reported. - Category: style - Level: warning - Fix: suggestion - Scope: module Reported @allow("constant-condition", { reason: "required sentinel branch" }) function ready(): boolean { if (true) { return true; } return false; } Accepted @expect("constant-condition", { reason: "required sentinel branch" }) function ready(): boolean { if (true) { return true; } return false; } Prior art - typescript-eslint ยท prefer-ts-expect-error language/linter/src/rules/style/preferexpectdiagnostic.rs:7