Closed
Description
Repro
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/promise-function-async": "error"
}
}
{
"compilerOptions": {
"target": "es2017",
"experimentalDecorators": true
},
"files": [
"index.ts"
]
}
const SomeFancyDecorator = (): MethodDecorator => (target) => target;
export class Foo {
@SomeFancyDecorator()
method() {
return Promise.resolve('foo');
}
}
Expected Result
/Users/recuedav/Workspace/GitHub/RecuencoJones/typescript-eslint-issue/index.ts
5:3 error Functions that return promises must be async @typescript-eslint/promise-function-async
✖ 1 problem (1 error, 0 warnings)
Actual Result
/Users/recuedav/Workspace/GitHub/RecuencoJones/typescript-eslint-issue/index.ts
4:3 error Functions that return promises must be async @typescript-eslint/promise-function-async
✖ 1 problem (1 error, 0 warnings)
Additional Info
Repository for reproduction: https://github.com/RecuencoJones/typescript-eslint-issue-751
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
1.11.0 |
@typescript-eslint/parser |
1.11.0 |
TypeScript |
3.4.3 |
ESLint |
5.16.0 |
node |
10.15.0 |
npm |
6.7.0 |