-
Book Overview & Buying
-
Table Of Contents
React Application Architecture for Production..
By :
Now that we've covered linting, let's look at code formatting. In this section we will cover the following topics:
Code formatting is about making our code look consistent and readable. When we're working in a team, we all have different preferences for how code should look - some of us like semicolons, others don't, some prefer single quotes, others double quotes.
The problem is that these differences can make code reviews harder and create unnecessary diffs and conflicts. When we're focused on the logic of our code, we don't want to be distracted by formatting inconsistencies.
Prettier is a code formatter that automatically formats our code according to a set of rules. It's great because we don't have to debate whether to use semicolons or not...