eslint-git-integration

1.1.0 • Public • Published

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.

/eslint-git-integration/

    Package Sidebar

    Install

    npm i eslint-git-integration

    Weekly Downloads

    3

    Version

    1.1.0

    License

    MIT

    Last publish

    Collaborators

    • chrisbottin
    • germanrio