Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

require-atomic-updates false positive #11687

TheModMaker opened this issue May 8, 2019 · 1 comment


None yet
2 participants
Copy link

commented May 8, 2019

May be related to #11194, but that looked more like naming conflicts.

Tell us about your environment

  • ESLint Version: 5.16.0
  • Node Version: 11.13.0
  • npm Version: 6.7.0

What parser (default, Babel-ESLint, etc.) are you using?

Please show your full configuration:

module.exports = {
    "parserOptions": {
        "ecmaVersion": 2017
    "rules": {
        "require-atomic-updates": "error",

What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.

async function f() {
  try { = doSomething();
  }  catch (e) { = null;
    await doElse();

What did you expect to happen?
No errors.

What actually happened? Please include the actual, raw output from ESLint.

  5:5  error  Possible race condition: `` might be reassigned based on an outdated value of ``  require-atomic-updates

✖ 1 problem (1 error, 0 warnings)

The doSomething method is synchronous so it cannot violate this rule about using "await". I'm thinking it is confused about reassigning in the "catch" block, but for a synchronous method, that should be allowed and not violate this rule.

Are you willing to submit a pull request to fix this bug?

@mysticatea mysticatea added accepted rule and removed triage labels May 8, 2019


This comment has been minimized.

Copy link

commented May 8, 2019

Thank you for the report.

I have confirmed that #11224 fixes this issue also in fortune.

mysticatea added a commit that referenced this issue May 8, 2019

mysticatea added a commit that referenced this issue May 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.