one-var": [2, { initialized: "never" }]
raised when multiple declarations exist in for loop
#2505
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
This is related to #2342.
I want to use the rule
"one-var": [2, { initialized: "never" }]
. It mostly works correctly, except it complains about:With this error:
Split initialized 'var' declarations into multiple statements.
Is there some way to ignore statements inside for loops? I don't mind multiple declarations in there, but I do want to prevent this:
The text was updated successfully, but these errors were encountered: