restore: template-no-negated-condition (accidentally deleted in 133a16fc)#2708
Merged
NullVoxPopuli merged 1 commit intoember-cli:masterfrom Apr 15, 2026
Merged
Conversation
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
approved these changes
Apr 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-conditionandtemplate-no-negated-comparisonare 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
lib/rules/template-no-negated-condition.js(295 lines, verbatim from pre-deletion)tests/lib/rules/template-no-negated-condition.js(489 lines)docs/rules/template-no-negated-condition.mdTest plan
254 test files)requireindex