I've got a problem with my pre-commit script. I'm trying to run "ng lint" of my angular project pre-commit file; I see the errors on logs when detects lint errors but the pre-commit processs pass sucessfully. I need to do ng-lint in pre-commit file because I'm going to run other validations... How can I get the message when the ng lint dont pass sucessfully?
My script:
#!/bin/bash
### other scripts to validate custom commits
-----------
### Run ng lint
echo "pre-commit hook --> linting" ng lint
ng lint
echo -e "ng lint pass sucessfully \n\n"
Log
pre-commit hook --> linting
Linting "front-firefly-backoffice"...
/home/apanez/Escritorio/htdocs/eci/front-firefly/src/app/stock/limit-sale/components/limit-sale-detail/limit-sale-detail.component.ts:30:14
ERROR: 30:14 component-class-suffix The name of the class LimitSaleDetailComp should end with the suffix Component (https://angular.io/styleguide#style-02-03)
Lint errors found in the listed files.
ng lint pass sucessfully