why does codelyzer 4 remove templates-use-public?

657 Views Asked by At

Codelyzer 4 has removed templates-use-public. "ng lint" will not report error when accessing a private member in html template. Does any alternative rule exist?

2

There are 2 best solutions below

0
On BEST ANSWER

From what I see in this issue: https://github.com/mgechev/codelyzer/issues/264
Codelyzer now delegates this to angular compiler itself.

There is also Angular Language Service, which should check that: https://angular.io/guide/language-service

0
On

I still know the cause exactly. However, in angular 5, "ng test" and "ng build -prod" will report errors when html template accesses private members.