Fix for `require-await-function` overly aggressive
fengb opened this issue · comments
Benjamin Feng commented
There are a few cases where I ran --fix
on the codebase:
// before
const promise = render();
// after
const promise = await render();
Assignment to a "require await" function probably should not be auto fixed. It's preferable here to manually disable the rule since it is actually testing the result of the promise.
I think the correct solution is only applying the fix on top level function calls.
Bryan Mishkin commented
So you think we should still flag a violation on assignment but don't autofix it?