DEV Community

Discussion on: VS Code - You don't need a formatting extension (Prettier and friends)

Collapse
 
brianmcbride profile image
Brian McBride

Code formatting is, obviously, strongly opinionated. If you are only working on your code and that is all that ever will be - go for whatever you want.

The more people who interact with your code - the more reason to use a very standarized code-formatter. Prettier seems to be the most used, at least in a lot of languages. You have newer languages like GoLang who put immediate thought into providing a formatter.

The reason to use a standard formatter is that it helps others in reading code. While people might disagree on how much to indent, where to break lines, etc... the fact is that a general format allows us all to recogize what we are looking at better.

Just like your post here. You used paragraphs, bulleted lists, headers, etc... You could have formatted things in your own special way I suppose. Instead you followed the conventions set by the other thousands of posts to Dev.to. A tool like Prettier just makes it easier for us all to follow the conventions that thousands of others are using as well.