eslint-git-integration
v1.1.0
Published
ESLint integration with Git to allow linting only changed files inside a Git repository.
Downloads
1
Readme
ESLint Git Integration
This tool allows linting only changed files inside a Git repository.
This tool uses git diff
to obtain list of changed JavaScript files in the repository and then lint them with eslint
.
Example
var eslintGit = require('eslint-git-integration');
eslintGit.lintChanges({
stagedFilesOnly: true,
showColors: true,
debug: true
})
.then(function () {
// Success commands
})
.catch(function () {
// Failure commands
});
Options
stagedFilesOnly: If you want to check only the changed files which are staged.
showColors: If you want to show
eslint
results with colors.debug: If you want to see additional information.