[require-atomic-updates] has too many false positives #12423
Labels
archived due to age
This issue has been archived; please open a new issue for any further discussion
bug
ESLint is working incorrectly
triage
An ESLint team member will look at this issue soon
Tell us about your environment
What parser (default, Babel-ESLint, etc.) are you using?
@typescript-eslint/parser
Please show your full configuration:
Here it is, just uncomment the "require-atomic-updates" rule.
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
npx eslint src --ext '.ts, .tsx'
What did you expect to happen?
No error detected.
What actually happened? Please include the actual, raw output from ESLint.
ESLint doesn't like my assignment, according to the rules of this rule:
I don't think this is the case, the new value doesn't depend on the previous value.
Kind of, but
stat
is a locally scoped variable and by usingawait
I'm pausing the entire function so nothing else could mutate the value assigned tostat
while I'm awaiting.Are you willing to submit a pull request to fix this bug?
I'm not too familiar with the AST, but with some pointers perhaps I can help.
The text was updated successfully, but these errors were encountered: