简体   繁体   中英

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 package s.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM