EN
VS Code - create Prettier formatter configuration file
0
points
In this article, we would like to show you how to create prettier configuration file for your project in VS Code.
Quick solution:

Step by step
1. go to your project in VS Code,
2. create new .prettierrc
file in the project main directory,
3. set your own configuration inside the file.
Note:
The example from Quick solution presents how to set the
tabWidth
depending on technology (tabWidth: 4
for all file types,tabWidth: 2
only for.html
files).
Practical example
In this section, we present example .prettierrc
file.
{
"tabWidth": 2,
"overrides": [
{
"files": "*.html",
"options": {
"tabWidth": 2
}
}
]
}