- yarn add prettier
- Creates a file called .prettierrc with config below.
{
"trailingComma: "es5",
"tabWidth": 2,
"semi": true,
"singleQuote": true
}
- Creates script in package.json
"style:check": "prettier --check 'src/**/*.ts' 'test/**/*.ts'";
"style:fix": "prettier --write 'src/**/*.ts' 'test/**/*.ts'"