Replies: 1 comment
-
I'm closing this discussion as this proposal is no longer needed. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, the rule @angular-eslint/template/no-call-expression only accepts one allowed prefix via its
allowPrefix
property. This discussion proposes that the rule should be able to accept multiple allowed prefixes instead of only accepting at most one. One way to go about it would be to defineallowPrefix?: string;
rather asallowPrefixes?: string | string[];
(and then, of course, make the appropriate changes in the rule's logic to check all supplied prefixes).The motivation behind this is the adoption of signals in the Angular code I develop at my job. Currently, the no-call-expression rule incorrectly warns against signal reads in our templates. We'd like to solve this issue by skipping the rule for expressions that have a "$"-prefix. Then we can make sure to name our signals accordingly and all is well. However, the "$"-prefix clashes with our current @typescript-eslint/naming-convention setup which requires an underscore ("_") prefix for all
protected
properties. Therefore, aprotected
signal must be named with a "_$"-prefix in order to satisfy the naming convention. So, ideally, we'd be able to give the no-call-expression rule two prefixes: "$" and "_$" but that is currently not supported.Beta Was this translation helpful? Give feedback.
All reactions