While enabling wotan for a project of mine, I found this gem:
await this.observeGroupsAndScenes; // Unnecessary 'await' of a non-Promise value. [await-only-promise]
where observeGroupsAndScenes is a function that returns a promise. While wotan helped me find this, (and the --fix option removed the await 😨), I think it could be smarter - in this case I forgot the parentheses:
await this.observeGroupsAndScenes(); // correct
Would it be possible to detect this and provide both errors?
Like "Unnecessary 'await' of a non-Promise value" OR "Did you forget parentheses?"
While enabling
wotanfor a project of mine, I found this gem:where
observeGroupsAndScenesis a function that returns a promise. Whilewotanhelped me find this, (and the--fixoption removed theawait😨), I think it could be smarter - in this case I forgot the parentheses:Would it be possible to detect this and provide both errors?
Like
"Unnecessary 'await' of a non-Promise value" OR "Did you forget parentheses?"