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!
Classic DEV Post from Nov 5

What’s the most frustrating thing about the process of looking for work or interviewing?


Masato Ohba
Software Engineer

Do you write code almost every day?

Join ❤️