refactor: Deferred to a class (#10282)

This commit is contained in:
Nikolay Vitkov
2023-05-31 23:36:19 +02:00
committed by GitHub
parent 5fc136eec1
commit 39e9737232
23 changed files with 164 additions and 149 deletions

View File

@@ -194,6 +194,12 @@ module.exports = {
selector: "CallExpression[callee.name='require']",
message: '`require` statements are not allowed. Use `import`.',
},
{
// We need this as NodeJS will run until all the timers have resolved
message: 'Use method `Deferred.race()` instead.',
selector:
'MemberExpression[object.name="Promise"][property.name="race"]',
},
],
'@typescript-eslint/no-floating-promises': [
'error',