diff --git a/packages/eslint-plugin/src/rules/promise-function-async.ts b/packages/eslint-plugin/src/rules/promise-function-async.ts index 8ec816b456b..1575cf02dfc 100644 --- a/packages/eslint-plugin/src/rules/promise-function-async.ts +++ b/packages/eslint-plugin/src/rules/promise-function-async.ts @@ -105,7 +105,8 @@ export default util.createRule({ if ( node.parent && - node.parent.type === 'Property' && + (node.parent.type === 'Property' || + node.parent.type === 'MethodDefinition') && (node.parent.kind === 'get' || node.parent.kind === 'set') ) { return; diff --git a/packages/eslint-plugin/tests/rules/promise-function-async.test.ts b/packages/eslint-plugin/tests/rules/promise-function-async.test.ts index ed798ca18e2..46100db7982 100644 --- a/packages/eslint-plugin/tests/rules/promise-function-async.test.ts +++ b/packages/eslint-plugin/tests/rules/promise-function-async.test.ts @@ -54,6 +54,12 @@ class InvalidAsyncModifiers { public set asyncGetter(p: Promise) { return p; } + public get asyncGetterFunc() { + return async () => new Promise(); + } + public set asyncGetterFunc(p: () => Promise) { + return p; + } } `, `