All Projects → grvcoelho → Lint Diff

grvcoelho / Lint Diff

Licence: mit
💅 Run eslint only in the changed parts of the code

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Lint Diff

shell-ci-build
A submodule to lint your shell projects with shellcheck in travis.ci builds
Stars: ✭ 39 (-57.61%)
Mutual labels:  lint, travis
arduino-lint
Tool to check for problems with Arduino projects
Stars: ✭ 63 (-31.52%)
Mutual labels:  lint, ci
breakcheck
Backwards compatibility linter for Go.
Stars: ✭ 66 (-28.26%)
Mutual labels:  lint, ci
makefiles
No description or website provided.
Stars: ✭ 23 (-75%)
Mutual labels:  lint, ci
Reviewdog
🐶 Automated code review tool integrated with any code analysis tools regardless of programming language
Stars: ✭ 4,541 (+4835.87%)
Mutual labels:  lint, ci
learning-lighthouse-ci
Learning Google's Lighthouse CI from scratch with a minimal template web app (quickstart)
Stars: ✭ 46 (-50%)
Mutual labels:  ci, travis
prettier-check
Check that all files match prettier code style.
Stars: ✭ 54 (-41.3%)
Mutual labels:  lint, ci
Readable Pylint Messages
List of pylint human readable message ids and dev readable codes
Stars: ✭ 134 (+45.65%)
Mutual labels:  lint, travis
Travis Watch
Stream live travis test results of the current commit to your terminal!
Stars: ✭ 294 (+219.57%)
Mutual labels:  ci, travis
Format.cmake
💅 Stylize your code! Automatic clang-format and cmake-format targets for CMake.
Stars: ✭ 94 (+2.17%)
Mutual labels:  lint, ci
prebuild-ci
Use CI to auto upload prebuilds
Stars: ✭ 17 (-81.52%)
Mutual labels:  ci, travis
Danger
🚫 Stop saying "you forgot to …" in code review (in Ruby)
Stars: ✭ 4,691 (+4998.91%)
Mutual labels:  ci, travis
npm-groovy-lint
Lint, format and auto-fix your Groovy / Jenkinsfile / Gradle files using command line
Stars: ✭ 124 (+34.78%)
Mutual labels:  lint, ci
egg-ci
Auto gen ci config file
Stars: ✭ 15 (-83.7%)
Mutual labels:  ci, travis
Woke
✊ Detect non-inclusive language in your source code.
Stars: ✭ 190 (+106.52%)
Mutual labels:  lint, ci
github-status-updater
Command line utility for updating GitHub commit statuses and enabling required status checks for pull requests
Stars: ✭ 83 (-9.78%)
Mutual labels:  ci, travis
Env Ci
Get environment variables exposed by CI services
Stars: ✭ 180 (+95.65%)
Mutual labels:  ci, travis
Lighthousebot
Run Lighthouse in CI, as a web service, using Docker. Pass/Fail GH pull requests.
Stars: ✭ 2,251 (+2346.74%)
Mutual labels:  ci, travis
ionic-travis
Ionic app demo built with Travis CI
Stars: ✭ 15 (-83.7%)
Mutual labels:  ci, travis
Danger Js
⚠️ Stop saying "you forgot to …" in code review
Stars: ✭ 4,076 (+4330.43%)
Mutual labels:  ci, travis

lint-diff

Build Status

💅 Run eslint only in the changed parts of the code

Why

ESLint is a great tool to enforce code style in your code, but it has some limitations: it can only lint entire files. When working with legacy code, we often have to make changes to very large files (which would be too troublesome to fix all lint errors)and thus it would be good to lint only the lines changed and not the entire file.

lint-diff receives a commit range and uses ESLint to lint the changed files and filter only the errors introduced in the commit range (and nothing more).

State of the art

  • lint-staged is a similar tool that lints only the staged changes. It's very helpful for adding a precommit hook, but it cannot be used to enforce the styleguide on a Continuous Integration service like Travis, because the changes are already commited.

Usage

  1. Install it:
$ npm install lint-diff
  1. Install eslint and add your eslint configuration file.

  2. Use it:

# This will lint the last commit
$ lint-diff HEAD^..HEAD

Examples

  1. Lint the last 3 commits:
$ lint-diff HEAD~3..HEAD
  1. Lint local changes that are not yet commited (similar to what lint-staged do):
$ lint-diff HEAD
# or
$ lint-diff
  1. Lint all commits from a build in Travis:
# This environment variable will be available in any Travis build
$ lint-diff $TRAVIS_COMMIT_RANGE
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].