21

Can someone please guide me about the following questions:

  1. What is the difference between codelyzer and tslint?
  2. Are both used for code analysis only? If so, then which one is mostly recommended?
  3. Are both dependent on each other?
  4. Do we need both at the same time for any particular Angular 2+ project?

I'm so confused regarding both of these npm packages.

BuZZ-dEE
  • 6,075
  • 12
  • 66
  • 96
Sagar Ganesh
  • 2,454
  • 3
  • 20
  • 32
  • 1
    Just read the [documentation](https://github.com/mgechev/codelyzer). The first sentence "A set of tslint rules for static code analysis of Angular TypeScript projects." answers 2, 3, 4, and probably 1. – str Apr 25 '17 at 06:39
  • @str thanks a lot. :) – Sagar Ganesh Apr 25 '17 at 07:11

1 Answers1

16

The Github repo says it all :

A set of tslint rules for static code analysis of Angular TypeScript projects.

So no they're not both dependent on each other. Only Codelyzer relies on TsLint.

And yes you need both of them for your angular projects if you want to lint your code OR you can use only TsLint and set your own rules but it's not too much fun and I'd advise you to use Codelyzer ;)

Community
  • 1
  • 1
maxime1992
  • 22,502
  • 10
  • 80
  • 121