Sagar Ganesh
Sagar Ganesh

Reputation: 2584

What is the difference between codelyzer and tslint?

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.

Upvotes: 22

Views: 6742

Answers (1)

maxime1992
maxime1992

Reputation: 23813

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 ;)

Upvotes: 17

Related Questions