• 4 months ago
Prettier is a code formatter utility essentially to format the code in multiple programming languages. This video shows how I'm using prettier in Node.js and Express.js.
Transcript
00:00Printer is a code formatter utility that is very useful for formatting code.
00:10To install Printer, I will use this CLI command.
00:17To use Printer, I will create a configuration file in the main directory.
00:37The configuration file should contain a JSON object with the wanted options.
00:55For example, this.
01:01These are only several available options for Printer.
01:09Now I need to add a command for npm in the package.json file.
01:25First of all, I want to format the number of tabs in each line.
01:45Right now I have 4 tabs in each line.
02:13Now I have 2 tabs.
02:19The SMI option will add semicolons to terminate the statements.
02:42The single quote allows us to decide whether our code will use single or double quotes.
03:02Now I will use double quotes.
03:32There are many options available in Printer.
03:38You can analyze them and create configuration files with wanted options.

Recommended