We're using Angular and I'm trying to switch from tslint to eslint.
A rule that throws around 600 warnings is the Missing return type on function
from eslint@typescript-eslint/explicit-module-boundary-types.
I do understand that I should use return types for my functions and how to do it. There's virtually no use for lifecycle methods in Angular though. What should I return from ngOnInit?
So the question is: how can I use this rule for every function but not ngOnInit, ngOnDestroy etc?
ngOnInit(): void { // meh
...
}
ngOnInit() { // yay
...
}
Just in case that it is relevant, my .eslintrc.json:
extends": [
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],