You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mdjermanovic opened this issue
Oct 5, 2023
· 4 comments
· Fixed by #18155
Assignees
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionbugESLint is working incorrectlycoreRelates to ESLint's core APIs and featuresrepro:yes
Node version: v20.7.0
npm version: v10.1.0
Local ESLint version: v8.50.0 (Currently used)
Global ESLint version: Not found
Operating System: win32 10.0.19045
What parser are you using?
Default (Espree)
What did you do?
I updated the no-undef rule to throw an error on the first file it gets. Then I ran npx eslint .
What did you expect to happen?
ESLint to print the error and then finish right after.
What actually happened?
ESLint prints the error, but after that it takes 20 seconds for the command prompt to appear again because ESLint keeps linting other files after the error is thrown. This seems unnecessary as it will not change the outcome.
I am willing to submit a pull request for this issue.
Additional comments
I believe this happens because all tasks have already been added to the queue. If we want to fix this behavior, the change would probably be in this part of the code:
acceptedThere is consensus among the team that this change meets the criteria for inclusionbugESLint is working incorrectlycoreRelates to ESLint's core APIs and featuresrepro:yes
Environment
Node version: v20.7.0
npm version: v10.1.0
Local ESLint version: v8.50.0 (Currently used)
Global ESLint version: Not found
Operating System: win32 10.0.19045
What parser are you using?
Default (Espree)
What did you do?
I updated the
no-undef
rule to throw an error on the first file it gets. Then I rannpx eslint .
What did you expect to happen?
ESLint to print the error and then finish right after.
What actually happened?
ESLint prints the error, but after that it takes 20 seconds for the command prompt to appear again because ESLint keeps linting other files after the error is thrown. This seems unnecessary as it will not change the outcome.
Link to Minimal Reproducible Example
Participation
Additional comments
I believe this happens because all tasks have already been added to the queue. If we want to fix this behavior, the change would probably be in this part of the code:
eslint/lib/eslint/flat-eslint.js
Lines 785 to 879 in dd79abc
The text was updated successfully, but these errors were encountered: