Fix lint errors in Angular cli

The mind, once stretched by a new idea, never regains its original dimensions.

Problem:- In Angular cli after executing the command ng lint shows a lot of lint errors based on the configuration `tslint.json`, how to fix lint errors ?

tslint error in angular


Run the below command

tslint --fix src/**/*.ts -t verbose


  • It will fix most of the issues and display the errors that need to be manually fixed.
  • Incase you are getting error that tslint command is not recognized, try installing tslint binary as below:-
sudo yarn global add tslint typescript

Leave a Reply

Your email address will not be published. Required fields are marked *