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
tslint processes the template-no-call-expression rule even when it is set to false and also when a tslint:disable:template-no-call-expression comment is added to either the template (using an HTML comment) or the component's class file (using a TypeScript comment).
As a result, tslint spams me with Call expressions are not allowed in templates except in output handlers.
Context and configuration
Please share:
Which rule is causing the problem template-no-call-expression
What's the content of ~/.codelyzer.js (if applicable)
no .codelyzer.js file.
To Reproduce
Not yet reproduced in a minimal project, but components use separate template files, in the same subdirectory as the component's class. Template contains method calls in some property bindings (for HTML elements, Angular directives, and child components) or in interpolations {{ ... }}. Where the bound properties are not annotated with @Output() in their declarations, tslint reports: Call expressions are not allowed in templates except in output handlers even when the rule should be turned off.
Expected behavior
I expect tslint with codelyzer to enforce all non-disabled rules, while ignoring and not reporting errors for rules that are disabled.
Code
In the code below, tsling with codelyzer reports an error at isValueNoChoice(inputValue). If the rule were enabled, I would expect this error. When the rule is disabled, I do not.
Edit : fix spelling of rule name from template-no-call-expressssion to template-no-call-expression. Even with the corrected name, still having the same problem.
The text was updated successfully, but these errors were encountered:
Zarepheth
changed the title
Cannot disable "template-no-call-expressssion" rules.
Cannot disable "template-no-call-expression" rules.
Jun 6, 2019
Describe the bug
tslint
processes thetemplate-no-call-expression
rule even when it is set tofalse
and also when atslint:disable:template-no-call-expression
comment is added to either the template (using an HTML comment) or the component's class file (using a TypeScript comment).As a result,
tslint
spams me withCall expressions are not allowed in templates except in output handlers
.Context and configuration
Please share:
template-no-call-expression
tsconfig.json
~/.codelyzer.js
(if applicable)no
.codelyzer.js
file.To Reproduce
Not yet reproduced in a minimal project, but components use separate template files, in the same subdirectory as the component's class. Template contains method calls in some property bindings (for HTML elements, Angular directives, and child components) or in interpolations
{{ ... }}
. Where the bound properties are not annotated with@Output()
in their declarations, tslint reports:Call expressions are not allowed in templates except in output handlers
even when the rule should be turned off.Expected behavior
I expect tslint with codelyzer to enforce all non-disabled rules, while ignoring and not reporting errors for rules that are disabled.
Code
In the code below, tsling with codelyzer reports an error at
isValueNoChoice(inputValue)
. If the rule were enabled, I would expect this error. When the rule is disabled, I do not.Environment
From
package.json
:ng --version
output:6.9.0
Partial
tslint.json
file:Edit : fix spelling of rule name from
template-no-call-expressssion
totemplate-no-call-expression
. Even with the corrected name, still having the same problem.The text was updated successfully, but these errors were encountered: