@artsy/lint-changed
Lint only files that have changed since last update
Last updated a month ago by artsy-engineering .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @artsy/lint-changed 
SYNC missed versions from official npm registry.

@artsy/lint-changed

This package is inspired heavily by lint-staged. Also checkout pull-lock.

We waste a lot of time of CI time doing unnecessary tasks. Why lint all your files when git already tells you which files have changed? @artsy/lint-changed helps by only running lint tags for the files that have changed since master (when not on master) or since the last tag (if you are on master).

Basic Configuration

Add a lint-changed key to your package.json with a pattern of files to match and the command or commands you'd like to run for each changed file. Each command will be ran for every changed file that matches it's pattern.

{
  "lint-changed": {
    "*.js": ["eslint", "prettier -c"],
    "*.ts": "tslint"
  }
}

For the given configuration above if the following three files were changed...

foo.js
bar.ts
baz.json

You could expect the following commands to be ran

eslint foo.js
prettier -c foo.js
tslint bar.ts

Note that baz.json would be skipped because it doesn't match with any patterns in the configuration.

Configuring base branch

By default Artsy will use master as the base branch for detecting changes. In case your default branch is not master you can let Artsy know what branch to use as a base branch.

{
  "lint-changed-branch": "development",
  "lint-changed": {
    "*.js": ["eslint", "prettier -c"],
    "*.ts": "tslint"
  }
}

About Artsy

This project is the work of engineers at Artsy, the world's leading and largest online art marketplace and platform for discovering art. One of our core Engineering Principles is being Open Source by Default which means we strive to share as many details of our work as possible.

You can learn more about this work from our blog and by following @ArtsyOpenSource or explore our public data by checking out our API. If you're interested in a career at Artsy, read through our job postings!

Current Tags

  • 3.0.5-canary.16.187.0                                ...           canary (3 months ago)
  • 3.1.0                                ...           latest (a month ago)

30 Versions

  • 3.1.0                                ...           a month ago
  • 3.0.5-canary.16.187.0                                ...           3 months ago
  • 3.0.5-canary.16.179.0                                ...           3 months ago
  • 3.0.5-canary.16.171.0                                ...           3 months ago
  • 3.0.5-canary.16.167.0                                ...           3 months ago
  • 3.0.5-canary.16.159.0                                ...           3 months ago
  • 3.0.5-canary.15.158.0                                ...           3 months ago
  • 3.0.5-canary.14.147.0                                ...           4 months ago
  • 3.0.4                                ...           5 months ago
  • 3.0.3                                ...           5 months ago
  • 3.0.3-canary.8.109.0                                ...           5 months ago
  • 3.0.3-canary.7.97.0                                ...           5 months ago
  • 3.0.3-canary.6.93.0                                ...           5 months ago
  • 3.0.3-canary.5.85.0                                ...           5 months ago
  • 3.0.2                                ...           5 months ago
  • 3.0.2-canary.undefined.76.0                                ...           5 months ago
  • 3.0.1                                ...           5 months ago
  • 3.0.1-canary.3.67.0                                ...           5 months ago
  • 3.0.1-canary.3.63.0                                ...           5 months ago
  • 3.0.1-canary.3.59.0                                ...           5 months ago
  • 3.0.1-canary.3.55.0                                ...           5 months ago
  • 3.0.1-canary.undefined.51.0                                ...           5 months ago
  • 3.0.0                                ...           5 months ago
  • 2.0.1-canary.2.42.0                                ...           5 months ago
  • 2.0.0                                ...           5 months ago
  • 1.0.0                                ...           5 months ago
  • 1.0.0-canary.1.32.0                                ...           5 months ago
  • 1.0.0-canary.1.28.0                                ...           5 months ago
  • 0.0.2-canary.1.24.0                                ...           5 months ago
  • 0.0.2-canary.1.20.0                                ...           5 months ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 8
Dependencies (5)
Dev Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |