xxxxxxxxxx
//Prettier is a popular code formatting tool that can format JavaScript code
//automatically according to a predefined set of rules.
//Install it Using->
npm install --save-dev prettier
//Then, create a .prettierrc file in your project directory
//or configure Prettier in your package.json:
{
"printWidth": 80,
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "es5",
"semi": true
}
//To format your code, you can run:
npx prettier --write .
xxxxxxxxxx
ctrl + shift + p
Format document with
Configure default formatter
Choose prettier