You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which @angular/* package(s) are relevant/releated to the feature request?
compiler-cli
Description
In Angular templates, ==, !=, ===, and !== all map to their JavaScript equivalents. However the JS community has generally standardized on === and !== as the go to comparison operators, with many tools banning == and != outright from codebases. This is because == and != have unintuitive type conversion semantics which can be hard to reason about and lead to bugs. We should consider emitting a warning/error for these operators in Angular templates to catch these mistakes immediately and save the developer an hour of debugging.
Proposed solution
An extended diagnostic could easily identify this case and emit a warning. Users would also be free to configure the diagnostic as a hard error if they desired and truly purge == and != from their codebase.
Alternatives considered
You could expect me to remember not to do this, but that ain't happenin'.
Reacted by Indraraj, Ertunga Bezirgan, Alan Agius, Oto Dočkal, Максим Иванов, Yousaf Nawaz, Paul Gschwendtner, Ertunga, Front-end developer, Enea Jahollari and 35 more
This feature request is now candidate for our backlog! In the next phase, the community has 60 days to upvote. If the request receives more than 20 upvotes, we'll move it to our consideration list.
You can find more details about the feature request process in our documentation.
Activity
angular-robot commentedon Jan 28, 2022
This feature request is now candidate for our backlog! In the next phase, the community has 60 days to upvote. If the request receives more than 20 upvotes, we'll move it to our consideration list.
You can find more details about the feature request process in our documentation.
DaSchTour commentedon Feb 1, 2022
I think this is what you are searching for: https://github.com/angular-eslint/angular-eslint/blob/master/packages/eslint-plugin-template/docs/rules/eqeqeq.md
feat(compiler-cli): add extended diagnostic non strict comparision op…
feat(compiler-cli): fix typo on BUILD.bazel files
feat(compiler-cli): fix format on spec file
feat(compiler-cli): fix typo on BUILD.bazel files in test folder
JeanMeche commentedon Sep 25, 2025
I'd say this one is of the scope of linters. (It's perfectly valid to use them, we shouldn't warn by default).
angular-automatic-lock-bot commentedon Oct 26, 2025
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.