-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
package: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-pluginworking as intendedIssues that are closed as they are working as intendedIssues that are closed as they are working as intended
Description
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have read the FAQ and my problem is not listed.
Repro
{
"rules": {
"@typescript-eslint/explicit-function-return-type": ["error", {
allowExpressions: true
}]
}
}
import { Controller, HttpCode, HttpStatus } from '@nestjs/common'
import { AppService } from './app.service'
// Actually it's imported from @nestjs/common package but for the sake of testing and quick glimpse adding here.
export declare const Get: (path?: string | string[]) => MethodDecorator
@Controller()
export class AppController {
constructor(private readonly appService: AppService) {}
@Get() // ESLint: Missing return type on function.(@typescript-eslint/explicit-function-return-type)
@HttpCode(HttpStatus.OK)
getHello() {
return this.appService.getHello()
}
}
Expected Result
Decorators shouldn't be reported as missing return type.
Actual Result
Missing return type on function.eslint@typescript-eslint/explicit-function-return-type
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
4.9.0 |
@typescript-eslint/parser |
4.9.0 |
TypeScript |
4.1.2 |
ESLint |
7.14.0 |
node |
14.15.1 |
Metadata
Metadata
Assignees
Labels
package: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-pluginworking as intendedIssues that are closed as they are working as intendedIssues that are closed as they are working as intended