I'm having below arrow function in my angular project:
this.httpClient.get('url').subscribe((response)=>{
});
In the above code ESLint should throw an error for not specifying return type.
CodePudding user response:
Check the rule @typescript-eslint/explicit-function-return-type. You need to set the option allowTypedFunctionExpressions
to false
. If you are using .eslintrc:
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowTypedFunctionExpressions": false
}
]