]>
git.proxmox.com Git - pve-eslint.git/blob - eslint/lib/rules/no-async-promise-executor.js
27116f1da788e78ab6705c11759a59022cc1c221
2 * @fileoverview disallow using an async function as a Promise executor
7 //------------------------------------------------------------------------------
9 //------------------------------------------------------------------------------
16 description
: "disallow using an async function as a Promise executor",
18 url
: "https://eslint.org/docs/rules/no-async-promise-executor"
24 async
: "Promise executor functions should not be async."
30 "NewExpression[callee.name='Promise'][arguments.0.async=true]"(node
) {
32 node
: context
.getSourceCode().getFirstToken(node
.arguments
[0], token
=> token
.value
=== "async"),