Consider the following markup:
// tslint:disable:trackBy-function <--
@Component({
template: `
<div *ngFor="let a of arr"> // Supposing that I want to disable the rule only here
{{ a }}
</div>
<div *ngFor="let a of arr1">
{{ a }}
</div>
`
})
class AppComponent {
arr = [1, 2, 3];
arr1 = [1, 2, 3, 4];
}
I can't disable a specific rule for specific line/lines. Currently I've to disable all the template.
Idea:
<!--
// tslint:disable
-->
<div>template</div>
<!--
// tslint:enable
-->
But indeed, it's ugly. I wonder if the disable/enable commets are configurable in tslint...
I think with more and more rules for template in this repo, we definitely will need a way to disable rules.
Most helpful comment
Idea:
But indeed, it's ugly. I wonder if the disable/enable commets are configurable in tslint...