DEV Community

Cover image for Bending TSLint to your needs
Tim Deschryver
Tim Deschryver

Posted on • Edited on • Originally published at timdeschryver.dev

Bending TSLint to your needs

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.

Read More...

Top comments (0)