This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
[no-misused-signals] restrict incorrect usage of signals - proposal #1891
Labels
package: eslint-plugin
Angular-specific TypeScript rules
PRs Welcome
If a high-quality PR is created for this it will be accepted
Description of the proposal
This rule forbids providing Signals to logical locations such as if statements in places where the TypeScript compiler allows them but they are not handled properly. It could be about using signals in a nullish check or comparing them using operators like
===
,==
,>
,<
,>=
, or<=
. These situations can often arise due to a missing call or just a misunderstanding of the way signals are handled.In some rare cases
===
or==
operators can be valid. So need to add optionignoreNullishCheck
to disable higlighting them.Reference: https://typescript-eslint.io/rules/no-misused-promises/
Incorrect code
Correct code
The text was updated successfully, but these errors were encountered: