0

I've been working with Angular for quite a while now, I've searched the whole web without finding any answers, but I'm always wondering why we have so many builders for testing and linting out there that can be registered in angular.json, such as

  • For Linting

@angular-devkit/build-angular:tslint
@angular-eslint/builder

  • For testing

@angular-builders/jest
@angular-devkit/build-angular:karma

jest, karma, tslint, eslint have their own commands and can be launched directly on the terminal, so why bother using a builder? Everything works just fine without one. And even worse, builders make things more cumbersome for the following reasons:

  • We have to write a lot code in angular.json to register the builder, and we have to specify the builder options
  • If we don't use builders, for example, if we want to lint with eslint, we just need to add a line in the script section of package.json, such as "lint": "eslint . --cache"

For ng build or ng serve I get the point, because there's no other way of doing these things without Angular's builders, but the usage of builers for linting and testing in an Angualr project makes me confused.

R. Richards
  • 24,603
  • 10
  • 64
  • 64
Bohao LI
  • 2,123
  • 2
  • 18
  • 24

0 Answers0