You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The goal of this enhancement request is to support passing async callbacks to other functions, which the user expects will involve the async callback. For example, a user might pass an async callback to a promise's .then method.
Since we don't have type information available, we probably don't want to have any defaults (not even assuming .then is for promises). So I would prefer making this a rule option where users could specify an ESQuery expression or similar. Not sure what the best user experience would be, though. Open to suggestions.
The text was updated successfully, but these errors were encountered:
Granted, I could also see this being useful since it is odd use of setTimeout. If I saw this in code review anywhere outside the qunit repo or outside demo files, I would flag it as an issue. But I can also see it being annoying that "simple" demos are rejected. I think using it with Promise#then and setTimeout while perhaps not indicative of good quality code, is also very unlikely to be indicative of a mistake that deserves a lint warning. Ultimately, it does not seem helpful I think, so I'd support changing the rule to just allow these.
This is a known limitation at present. Please use ESLint disable comments for false positives for now.
We need to design a user experience for what the rule options should look like, to allow users to allow whatever known false positives to be allowed. It would be ideal to make this as flexible as possible for most scenarios.
Follow-up from #68.
The goal of this enhancement request is to support passing async callbacks to other functions, which the user expects will involve the async callback. For example, a user might pass an async callback to a promise's
.then
method.Since we don't have type information available, we probably don't want to have any defaults (not even assuming
.then
is for promises). So I would prefer making this a rule option where users could specify an ESQuery expression or similar. Not sure what the best user experience would be, though. Open to suggestions.The text was updated successfully, but these errors were encountered: