Henrik Westerholm

H.Westerholm

// Autoformat & Lint your Angular application with a Husky pre-commit hook

shell
ng lint [project-name]
shell
npm install --save-dev prettier
json
{
    "singleQuote": true,
    "trailingComma": "all",
    "printWidth": 140,
    "tabWidth": 2,
    "semi": true
}
plaintext
/dist
/node_modules
/**/*.spec.ts
plaintext
"format": "prettier --write \"src/**/*.{ts,html,css,scss,json,md}\"",
shell
npm install --save-dev husky
npx husky init
plaintext
npm run lint && npm run format

Written by Henrik Westerholm

30. January, 2026



© 2026 Westerholm.dev