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 May 27

A beginner trying for the first Open Source Project

So I have been ranting few things since many months like I have graduated in ...

READ POST
Follow @oathkeeper to see more of their posts in your feed.
Masato Ohba
Software Engineer
More from @ohbarye
How to find Good First Issues to Contribute OSS
#opensource #showdev #javascript #graphql
Pixelate characters with canvas, and draw generative art!
#showdev #javascript #typescript #npm
Trending on dev.to
Untangling Nested Code
#practices #programming #beginners
What Do You Look For in a Mentor?
#javascript #discuss #frontend #mentorship
Lessons from releasing a personal project as a commercial product
#beginners #startup #showdev #career
Master the World of ReactJS - Issue #12
#react #redux #typescript #javascript
Open source: Cookie notifier, MailChimp mod, Editable job listings & more
#showdev #opensource #webdev #javascript
Proxymise Your Async Code
#javascript #coding
Making Snake Game With Javascript
#javascript #game #programming #fun
Part Two: Using Typescript with Redux
#javascript #react #redux #typescript