Cover image for Bending TSLint to your needs

Bending TSLint to your needs

timdeschryver profile image Tim Deschryver Updated on ・1 min read

After reading yet another twitter thread asking about the number of RxJS operators used in a project, I thought to myself that creating a small tool that does exactly this could be a fun little project.

After some time thinking about the best possible way to accomplish this task, I had split up the task into smaller ones to make it myself easier.
I had to:

  • iterate over every file
  • search for RxJS operators
  • keep count
  • print out the result

Keeping these smaller tasks in mind I noticed TSLint could be used for the first two tasks, doing most of the heavy lifting for me. This came in handy because I also wanted to dabble with TSLint and AST, or Abstract Syntax Tree, awesome two birds with one stone!

This post recounts the process I went through to create this new utility which I call rxjs-operator-counter.


Posted on by:

timdeschryver profile

Tim Deschryver


NgRx team member - Writer for AngularInDepth


markdown guide