require-atomic-updates isn't consistent between locals and params #11911
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?
default
Please show your full configuration:
require-atomic-updates: error
Configuration
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
Demo online
What did you expect to happen?
I'd prefer neither line to cause an error, but for consistency both lines should at least have the same behavior.
#10655 specified that local variables should be excluded. Function parameters have the same scope as local variables in the function. As far as I can reason as long as the local or param isn't captured by a closure, there's no reason to treat them differently.
If this was changed, I suspect it would also fix #11899
What actually happened? Please include the actual, raw output from ESLint.
Are you willing to submit a pull request to fix this bug?
My employer hasn't pre-approved your CLA, and there's probably no business justification for fixing this
The text was updated successfully, but these errors were encountered: