Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix: prefer-const autofix (fixes #10582) #10987
What is the purpose of this pull request? (put an "X" next to item)
[ ] Documentation update
What changes did you make? (Give an overview)
Is there anything you'd like reviewers to focus on?
I don't have time to do a full review now-- very sorry-- but I wanted to leave one small note while it's on my mind.
I hope to revisit this over the next few days. Thanks for your patience!
The new test cases don't seem to be multiline-- I think the focus of this issue has changed if I'm not mistaken? I think the goal now is to autofix when we know all parts of the declaration (all declarators in a VariableDeclaration, all properties in an ObjectPattern) can be made
@platinumazure youre right, it shouldnt matter if its multiline or not, Ill reformat the tests to be multiline.
For example, the code found https://github.com/eslint/eslint/pull/10987/files#diff-7bdeecf4f450247ac04335fce20a1e85R459.
I can change the code from
How does this sound? Did I answer your question?
As we discussed in Gitter-- the tests are fine, it's just that the commit message/PR title aren't quite accurate anymore. If others on the team are okay with this, we could just handle it as we merge.
I'm going to leave this open another couple of days for others to review, just in case.
@kaicataldo Did you want to take another look at this? Have your comments/questions been addressed?