Update
Given the comments I must not be explaining my point clearly.
- Good formatting is crucial to the readability of code (and sometimes syntax).
- Readable code with correct syntax is significantly easier to review.
- Everyone wins when there are more reviews.
So go ahead and critique the formatting in your answer, but please reformat the code in the question to encourage more reviews.
Original Answer
I feel editing to fix formatting is a net win for the community. Doing so makes it easier for other reviewers and provides a good example for the asker. While it may benefit the asker to do it themselves, they'll have plenty of opportunities later. Having a good example gives them something to model.
Additionally, I'm more likely to give a review if I don't have to paste it into my IDE to format it. And others reading the question won't be distracted by hard-to-read code. It also allows lurkers to help clean up the site without feeling pressured into a more detailed post.
Finally, I'm not too fond of any review that consists solely of a rebuke to format the code. Feel free to edit the question and include this in your answer, but don't make formatting your entire answer.
While consistent and clear formatting is very important, it's also quite trivial to pick up and point out. Let's not make this the primary focus of this site.