require-atomic-updates takes a very long time to run on large files #10893
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
archived due to age
This issue has been archived; please open a new issue for any further discussion
bug
ESLint is working incorrectly
rule
Relates to ESLint's core rules
Tell us about your environment
What parser (default, Babel-ESLint, etc.) are you using?
babel-eslint
Please show your full configuration:
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.
What did you expect to happen?
ESLint runs quickly on that file and shows all errors.
What actually happened? Please include the actual, raw output from ESLint.
The expected behavior happened, however it took WAY longer than it should have on this file. The file is contrived, its just a part of a file in our codebase where I started to see issues when I started to drill down into this. We just upgraded from ESLint 5.2 to 5.6 on a large codebase and ESLint was stalling. We use our own config (https://github.com/spothero/eslint-config) so I naturally thought it was something I had messed up in the config.
I then created a repo that just had the
test.js
file and the above.eslintrc
file. Through editing various things, I was finally able to realize that therequire-atomic-updates
rule was the culprit. If you disable it in the config with0
, the file executes quickly. If you enable it, the file takes MUCH longer to execute. This becomes magnified when you have many files in the codebase and ESLint just seems to hang without ever finishing them and moving on to the next build step.The text was updated successfully, but these errors were encountered: