no-undef-init incorrectly autofixes some var
declarations
#9231
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?
default
Please show your full configuration:
Configuration
What did you do? Please include the actual source code causing the issue.
Auto fix
no-undef-init
which changes behavior of codeWhat did you expect to happen?
Auto fix should not fix this part as it changes behavior of code.
What actually happened? Please include the actual, raw output from ESLint.
Before fix, the code logs 3 times
'selected'
; after fix, the code only logs 1 time.The text was updated successfully, but these errors were encountered: