This schematic will add Prettier, Husky and lint-staged to your Angular project, and configure a pre-commit hook that will format your project files.
ng add @ricmello/prettier
- install Prettier, Husky and lint-staged
- creates a pre-commit hook that format the staged files
npm install -g @ricmello/prettier
Then in an Angular CLI project run
ng g @ricmello/prettier:add