npm i -g prettier
npm i prettier --save-dev
{
"trailingComma": "es5",
"tabWidth": 1,
"semi": true,
"singleQuote": true,
"printWidth": 100,
"jsxBracketSameLine": false
}
https://prettier.io/docs/en/options.html
https://prettier.io/docs/en/editors.html
you can also setup auto formatting of your project files through menu option Preference -> Package settings -> JsPrettier -> Settings - User
{
"auto_format_on_save": true
}
"format": "prettier --write \"src/**/*.ts\" -l \"warn\""
"lint:fix": "tslint -p . --fix",
"format:fix": "prettier --write \"src/**/*.ts\" -l \"warn\" && npm run lint:fix"