Rule await-promise: make Promise implementation configurable #2661
Comments
I'd like to create PR for this but I've seen #2631 ("no-floating-promises: rewrite as walker function"). So the question is if this rule should use |
@darxriggs we want to move away from Which one you choose is up to you. For simple rules it's preferred to use a function. When you find yourself in the need to add several closures to the walker function, you should consider using |
Feature Request
TypeScript code being linted
with
tslint.json
configuration:Actual behavior
(await-promise) src/test.ts[8, 18]: 'await' of non-Promise.
Expected behavior
No error should be reported.
There are multiple Promise implementations and interfaces out there (
JQueryPromise
,Q.Promise
,Thenable
, etc.). Also see Promises/A+, Therefore the rule should be configurable likeno-floating-promises
already is.The text was updated successfully, but these errors were encountered: