Schematics compliance with call-signature lint rule #16754
Labels
area: schematics/angular
freq1: low
Only reported by a handful of users who observe it rarely
severity2: inconvenient
type: bug/fix
Milestone
馃殌 Feature request
Command
Description
It's a very good practice in TypeScript to enable the
typedef: ["call-signature"]
TSLint rule, which ensures that functions return type is explicit.Why?
Describe the solution you'd like
It would be nice if Angular CLI schematics could be compliant with that lint rule by default. It's currently not the case:
ngOnInit()
The first one is especially annoying as then we need to add
: void
each time we create a new component.That would also be more consistent with other schematics where the functions return type is indeed explicit (like guards, interceptors, etc.).
PR done in #16755. Note that it does not enable the lint rule, it just makes schematics compliant with it, so it has no consequences at all.
The text was updated successfully, but these errors were encountered: