• 3 months ago
Prettier is a popular code formatting tool that can be easily integrated into a Vue.js project to ensure consistent code style across a project. This video shows how to configure and use Prettier in a Vue.js application. There are many options for Prettier. You can choose the nedeed options to format automatically all your code.
Transcript
00:00Pre-Tier is a popular code formatting tool that can be easily integrated into a huge
00:10JS project to ensure consistent code style across a project.
00:20To install Pre-Tier, we need to run this CLI command.
00:38The next step is to create a configuration file for Pre-Tier.
00:46The supported configuration format is the JSON.
01:16Pre-Tier defaults to using single codes for strings literals.
01:28However, we can configure Pre-Tier to use double codes instead.
01:46To replace single codes with double codes, I need to add a special command in my package JSON file.
02:12Now, I can run Pre-Tier.
02:34And the double codes was uploaded as expected.
03:04With the tab width option, I can control the number of spaces used to represent a tab character in a formatted code.
03:34And with the semi option, I can automatically add semicolons at the end of statements.
04:04There are many options available for Pre-Tier,
04:28which allows to format automatically our code.

Recommended