require-atomic-updates complains about unrelated variable references
See original GitHub issueTell us about your environment
- ESLint Version: 6.0.1
- Node Version: 10.15.3
- npm Version: 6.4.1
What parser (default, Babel-ESLint, etc.) are you using?
default
Please show your full configuration:
Configuration
---
extends: eslint:recommended
parserOptions:
ecmaVersion: 2017
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() {}
async function t() {
for (const x of ['A', 'B', 'C']) {
await f(x);
}
for (const x of ['A', 'B', 'C']) {
await (() => f(x))();
}
}
t();
> eslint atomic-updates.js
What did you expect to happen?
I get no error or a useful explanation what is wrong with this code.
What actually happened? Please include the actual, raw output from ESLint.
I am getting this linting error:
…/atomic-updates/atomic-updates.js
7:3 error Possible race condition: `const x` might be reassigned based on an outdated value of `const x` require-atomic-updates
✖ 1 problem (1 error, 0 warnings)
Are you willing to submit a pull request to fix this bug?
I expect it to take me quiet long to understand the logic. Therefore not at this moment.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
require-atomic-updates - ESLint - Pluggable JavaScript Linter
This rule aims to report assignments to variables or properties in cases where the assignments may be based on outdated values. Variables. This...
Read more >Why is require-atomic-updates found here? - Stack Overflow
There are several open github issues referencing this bug, but the gist of it is that require-atomic-updates is currently broken.
Read more >www.ada-auth.org/cgi-bin/cvsweb.cgi/ai12s/ai12-012...
Indeed, Ada has C.6(22/2) to make it possible for users of Atomic and Volatile objects to be able to match such hardware requirements....
Read more >What is RCU? – “Read, Copy, Update”
Concurrent RCU readers can then continue accessing the old versions, and can dispense with the atomic operations, memory barriers, and communications cache ...
Read more >The O*NET® Content Model
Occupational Requirements Work Activities: General • Intermed iate • Detailed Organizational ... To download a reference file of all Content Model elements, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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 accepted issues failing to be implemented after 90 days tend to never be implemented, 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.
@hon2a Thanks. It looks the same issue as #11899.