Skip to content

remove: template-no-negated-comparison#2709

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

remove: template-no-negated-comparison#2709
NullVoxPopuli merged 1 commit intoember-cli:masterfrom
johanrd:remove/template-no-negated-comparison

Conversation

@johanrd
Copy link
Copy Markdown
Contributor

@johanrd johanrd commented Apr 14, 2026

Summary

Proposes removing template-no-negated-comparison.

Reasons:

  • No upstream equivalent in ember-template-lint — this is an original rule with no parity justification
  • not-eq is a first-class, standard ember-truth-helpers helper; flagging its use is a style opinion, not a correctness concern
  • No autofix, so users must manually rewrite perfectly valid code
  • Conceptual conflict with the newly-restored template-no-negated-condition (restore: template-no-negated-condition (accidentally deleted in 133a16fc) #2708): that rule's simplifyHelpers mode autofixes (not (eq ...))not-eq, i.e. towards the pattern this rule flags

Opening for NullVoxPopuli to decide — if there's appetite for a rule here, a narrower version flagging only the non-standard ne alias might make more sense than one flagging not-eq itself.

Related: closes #2693 if merged (that PR was documenting the same tension).

@NullVoxPopuli
Copy link
Copy Markdown
Contributor

conflicst!

This rule has no upstream equivalent in ember-template-lint and its
premise is debatable: `not-eq` is a first-class ember-truth-helpers
helper, so flagging it as wrong is a style opinion rather than a
correctness concern. Additionally, it conflicts conceptually with the
newly-restored `template-no-negated-condition`, which autofixes
`(not (eq ...))` to `not-eq` — the opposite direction.

Opening for NullVoxPopuli to decide.
@johanrd johanrd force-pushed the remove/template-no-negated-comparison branch from a1912f7 to e555454 Compare April 15, 2026 05:59
@johanrd
Copy link
Copy Markdown
Contributor Author

johanrd commented Apr 15, 2026

thanks, fixed

@NullVoxPopuli NullVoxPopuli merged commit 719580e 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