Example of using Ionic Angular with Prettier and TSLint.
npm install --save-dev --save-exact prettier
{
"singleQuote": true,
"trailingComma": "es5",
"requirePragma": false,
"arrowParens": "always"
}
"scripts": {
"prettier:list": "prettier --list-different \"./{e2e,src}/**/*.{scss,ts}\" || ECHO .",
"prettier:write": "prettier --write \"./{e2e,src}/**/*.{scss,ts}\"",
}
prettier --list-different
returns an error code of 1 if files need updating.
./{e2e,src}/**/*.{scss,ts}
.\e2e\*\*.scss
.\e2e\*\*.ts
.\src\*\*.scss
.\src\*\*.ts
npm install --save-dev --save-exact tslint-config-prettier
"scripts": {
"tslint-check": "tslint-config-prettier-check ./tslint.json"
}
{
"rulesDirectory": ["node_modules/codelyzer"],
"extends": ["tslint:latest", "tslint-config-prettier"]
}