Skip to content

restore: template-no-negated-condition (accidentally deleted in 133a16fc)#2708

Merged
NullVoxPopuli merged 1 commit intoember-cli:masterfrom
johanrd:restore/template-no-negated-condition
Apr 15, 2026
Merged

restore: template-no-negated-condition (accidentally deleted in 133a16fc)#2708
NullVoxPopuli merged 1 commit intoember-cli:masterfrom
johanrd:restore/template-no-negated-condition

Conversation

@johanrd
Copy link
Copy Markdown
Contributor

@johanrd johanrd commented Apr 14, 2026

Summary

Restores template-no-negated-condition, which was accidentally deleted in 133a16f ("Delete rules that never existed or have overlap with other rules").

The rule does exist in ember-template-lint as no-negated-condition — so the deletion premise was wrong for this one.

Note: template-no-negated-condition and template-no-negated-comparison are different rules with opposite goals:

  • template-no-negated-condition — port of upstream; flags {{#if (not condition)}}, suggests {{#unless condition}} instead (autofix)
  • template-no-negated-comparison — unrelated; flags negated comparison helpers like (not-eq ...)

Changes

  • Restores lib/rules/template-no-negated-condition.js (295 lines, verbatim from pre-deletion)
  • Restores tests/lib/rules/template-no-negated-condition.js (489 lines)
  • Restores docs/rules/template-no-negated-condition.md
  • Re-adds the README table entry

Test plan

  • All 8940 existing tests still pass (254 test files)
  • Rule is correctly loaded via requireindex

This rule is a direct port of ember-template-lint's `no-negated-condition`
and was deleted in 133a16f under the incorrect assumption that it never
existed upstream. NullVoxPopuli confirmed the confusion and asked for it
to be brought back.
@NullVoxPopuli NullVoxPopuli merged commit 8d8490b into ember-cli:master Apr 15, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants