grvcoelho / Lint Diff
Licence: mit
💅 Run eslint only in the changed parts of the code
Stars: ✭ 92
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
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
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
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
Danger Js
⚠️ Stop saying "you forgot to …" in code review
Stars: ✭ 4,076 (+4330.43%)
Mutual labels: ci, travis
lint-diff
💅 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
- Install it:
$ npm install lint-diff
-
Install
eslint
and add your eslint configuration file. -
Use it:
# This will lint the last commit
$ lint-diff HEAD^..HEAD
Examples
- Lint the last 3 commits:
$ lint-diff HEAD~3..HEAD
- Lint local changes that are not yet commited (similar to what lint-staged do):
$ lint-diff HEAD
# or
$ lint-diff
- 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].