Skip to content
This repository was archived by the owner on Mar 7, 2019. It is now read-only.

Commit 20155f1

Browse files
feat(rule): add no-async-promise-executor (warn)
1 parent 91ad0fa commit 20155f1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

environments/shared/recommended.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ module.exports = {
7373
// codebase. Best practice is to keep each file limited to a single responsibility.
7474
'max-classes-per-file': ['warn', 1],
7575

76+
// Disallow using an async function as a Promise executor
77+
// This rule aims to disallow async Promise executor functions.
78+
'no-async-promise-executor': 'error',
79+
7680
// Disallow await inside of loops
7781
// Performing an operation on each element of an iterable is a common task. However, performing
7882
// an await as part of each operation is an indication that the program is not taking full

0 commit comments

Comments
 (0)