My settings in VS Code are not set up nicely. I type the code like Mosh (first screenshot), but when I save if gets reformatted to look like the second screenshot. Can anyone point me in the right direction to fix this? (My default format is set to Prettier - Code formatter)
This is how mine formats this code as well (which I’m OK with). It’s Prettier that is doing the formatting. The difference could be the version of Prettier Mosh is using, or perhaps has configured his to behave differently. Prettier options are here: Options · Prettier
That said, Mosh forgot to wrap each
<Link> component in a
<li> element (he corrects it in a later lesson), so the formatted code won’t look like the top version once corrected.
Thank you for pointing out the missing
<li> tags in the tutorial. It makes sense now that the code formatting was affected by this. I appreciate your assistance and explanation. I’ll keep an eye out for those missing tags at the end of the tutorial as you mentioned.