Lint only over changed files

The bigger your project gets, the longer time lint takes.

So the following task is quite useful since we basically want to run lint only over changed files.

# package.json
  "scripts": {
    "tslint": "git diff --name-only develop... | grep -E '\\.tsx?$' | xargs yarn tslint"

I'm referring tslint here, but the same is true of eslint, stylelint, and etc.

Did you find this post useful? Show some love!

Hey there, we see you aren't signed in.

Please consider creating an account on It literally takes a few seconds and we'd appreciate the support so much. ❤️

Classic DEV Post from Dec 22 '17

How we can make a difference as software engineers

As the holiday season rolls around again the idea of doing good in the world ...

Follow @asopki to see more of their posts in your feed.