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!
DISCUSSION
Classic DEV Post from Jun 9

Do you have any home automation projects in the works?

Whether built, bought, or somewhere in between, what are the robots in your hom...

READ POST
Follow @ben 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
JSON, JSON, JSON
#javascript #webdev
Top 26 JavaScript Interview Questions I Wish I Knew
#javascript #interview #fullstack #career
An Introduction To Using Gatsby Image & Gatsby.js V2
#react #gatsbyjs #javascript #graphql
Haskell for javascript programmers.
#haskell #javascript #functional
Why Your Best Work is Hardest to Finish
#productivity #career #beginners
ps aux output in cronjobs
#bash #beginners #linux #devops
How to start contributing to open source as a junior or newbie?
#discuss #beginners
A Simple List Render Optimization For React 🏎
#javascript #react #performance #optimization