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-automatic-updates doesn't understand when the condition is re-checked #12108

Closed
Skalman opened this issue Aug 17, 2019 · 1 comment
Closed
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion auto closed The bot closed this issue bug ESLint is working incorrectly triage An ESLint team member will look at this issue soon

Comments

@Skalman
Copy link

Skalman commented Aug 17, 2019

Tell us about your environment

  • ESLint Version: v6.1.0
  • Node Version: v10.14.1
  • npm Version: v6.7.0

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

Please show your full configuration:

Configuration
{
  "parserOptions": {
    "ecmaVersion": 2018
  },
  "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.

let i = 0;
async function f() {
	if (i) {
		await g();
		if (i) {
			i = 0; // ERROR HERE
		}
	}
}
npx eslint eslint-bug.js

What did you expect to happen?

No error. I'm re-checking the condition after the await, so now I'm sure that the variable contains what I expect it to contain.

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

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

✖ 1 problem (1 error, 0 warnings)

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

@Skalman Skalman added bug ESLint is working incorrectly triage An ESLint team member will look at this issue soon labels Aug 17, 2019
@eslint-deprecated eslint-deprecated bot added the auto closed The bot closed this issue label Sep 17, 2019
@eslint-deprecated
Copy link

Unfortunately, it looks like there wasn't enough interest from the team
or community to implement this change. While we wish we'd be able to
accommodate everyone's requests, we do need to prioritize. We've found
that issues failing to reach accepted status after 21 days tend to
never be accepted, and as such, we close those issues.
This doesn't mean the idea isn't interesting or useful, just that it's
not something the team can commit to.

Thanks for contributing to ESLint and we appreciate your understanding.

@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Mar 16, 2020
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Mar 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion auto closed The bot closed this issue bug ESLint is working incorrectly triage An ESLint team member will look at this issue soon
Projects
None yet
Development

No branches or pull requests

1 participant