![]() ![]() For instance, Prettier will make a short const array declaration a one liner, but a declaration with a bunch of items in the array, it will split out into multiple lines to avoid horizontal scrolling (see demo GIF at the end). It makes some “logical” choices that I would make myself. ![]() One of the things I love about it is it’s not completely rigid with its rules. Prettier takes JavaScript code in, runs some of its formatting rules against it, and then spits out that JavaScript code with its formatting rules applied. ![]() Prettier is an open source project (originally started by James Long) that is an opinionated JavaScript formatter. I’d like to take that one step further and mention how you can combine that with the Prettier – Javascript Formatter plugin for VS Code to make a really nice editing experience. In my last post, I mentioned a tip to using the Format on Save option in VS Code. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |