Skip to content

Commit 9f1005a

Browse files
committed
refactor(await-async-utils): move function definition outside
1 parent 6177975 commit 9f1005a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/rules/await-async-utils.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,12 @@ function isAwaited(node) {
8787
return VALID_PARENTS.includes(node.type);
8888
}
8989

90+
const hasAThenProperty = node =>
91+
node.type === 'MemberExpression' && node.property.name === 'then';
92+
9093
function isPromiseResolved(node) {
9194
const parent = node.parent;
9295

93-
const hasAThenProperty = node =>
94-
node.type === 'MemberExpression' && node.property.name === 'then';
95-
9696
// wait(...).then(...)
9797
if (parent.type === 'CallExpression') {
9898
return hasAThenProperty(parent.parent);

0 commit comments

Comments
 (0)