Naive Puppets Marching

    This package has been deprecated

    Author message:

    Deprecated in favor of https://www.npmjs.com/package/lint-staged

    lint-changed-files

    0.0.2 • Public • Published

    Lint Changed Files

    npm

    A small CLI tool which lints all files that changed compared to the current git branchs upstream.

    This is especially useful when combined with pre-commit git hooks, for example with husky.

    ☁️ Setup

    1. Install dependencies

    npm i -D lint-changed-files husky

    2. Add pre-commit hook:

    // package.json
    {
      ...
      "husky": {
        "hooks": {
          "pre-commit": "lint-changed-files"
        }
      }
      ...
    }

    3. Enable pre-commit hook in your current repository.

    Fresh installations of your project will automatically set up the git hooks. To force husky to create the hooks in your current directory, just run npm install in your repository again.

    🤚 Manual usage

    This CLI works fine globally aswell. Just install it as ususal:

    npm install -g lint-changed-files

    Go to your project directory and execute:

    lint-changed-files

    ⚙️ Options

    You may use the --ext parameter to specify which file extensions should be passed to eslint. You may set it multiple times to enable multiple extensions. This works exactly like the eslint --ext option.

    ✍️ Contributing

    Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

    Keywords

    none

    Install

    npm i lint-changed-files

    DownloadsWeekly Downloads

    3

    Version

    0.0.2

    License

    MIT

    Unpacked Size

    3.08 kB

    Total Files

    3

    Last publish

    Collaborators

    • axe312