Fix lint errors in Angular cli – User friendly Tech help

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

n

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 ?

n

n

Solution:-

n

Run the below command

n

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

n

Note:

n

    n

  • It will fix most of the issues and display the errors that need to be manually fixed.
  • n

  • Incase you are getting error that tslint command is not recognized, try installing tslint binary as below:-
  • n

n

sudo yarn global add tslint typescript
Was this article helpful?
YesNo

Similar Posts