Codelyzer: templates-use-public removed - why? any alternative?

Created on 5 Jan 2018  路  5Comments  路  Source: mgechev/codelyzer

Hey, I just upgraded to codelyzer 4 and noticed that templates-use-public is no longer available. That's a pity because it was very useful for checking AOT compatibility.

Could you explain why it's been removed and whether there is an alternative? Plan to reimplement it maybe?

(I should probably ask this question on slack, although there is already a topic about that created a while ago and very quiet).

Cheers!

Most helpful comment

Could you please bring this rule back?
As explained here: https://www.rednxt.com/whats-new-in-angular-6/ in angular 6 this is no longer handled by the compiler but still isn't recommended.
It would be very useful because there is currently no way to check this.
Thanks!

All 5 comments

More details here https://github.com/mgechev/codelyzer/issues/264
You can use the Angular language service for the purpose.

Could you please bring this rule back?
As explained here: https://www.rednxt.com/whats-new-in-angular-6/ in angular 6 this is no longer handled by the compiler but still isn't recommended.
It would be very useful because there is currently no way to check this.
Thanks!

Please add it back, was one of the most useful rules for me.

Why double the work? The ngc already handles it. It's not a linting rule anymore, it's simply a compile-time error. You don't have lint rules for invalid JavaScript syntax since it will fail anyway. You don't have lint rules for types with TypeScript because that's what TypeScript is for. Why would you have this as a lint rule now?

I use "open" file-watcher/tsc/systemjs solution for development that is provided by IDE.
For prod build I use ngc --aot that takes place on separate build server.
As a result, development version works perfectly with invalid access rights, but the prod build fails. With the removal of the option developers will find the issue only after code has been commited to VCS and built for release.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Martin-Wegner picture Martin-Wegner  路  6Comments

dev054 picture dev054  路  4Comments

fabioemoutinho picture fabioemoutinho  路  5Comments

negberts picture negberts  路  3Comments

wKoza picture wKoza  路  6Comments