0.5.2 • Published 4 years ago

lint-unpushed v0.5.2

Weekly downloads
317
License
MIT
Repository
github
Last release
4 years ago

Lint Unpushed

Lint Unpushed will make sure your code passes relevant tests before git push.

Installation

npm install --save-dev lint-unpushed
# OR
yarn add --dev lint-unpushed

Then add lint-unpushed-install to your prepare script like so:

// package.json
{
  "scripts": {
    "prepare": "lint-unpushed-install"
  }
}

Configuration

Example config setup lint-unpushed to run Prettier on JS/JSON files, and Typescript typechecker before push

// package.json:
{
  "lint-unpushed": {
    "**/*.{js,json}": "prettier --list-different #FILES#",
    // ^ #FILES# is replaced with the list of files at runtime
    "**/*.{ts,tsx}": [
      "prettier --list-different #FILES#",
      "eslint #FILES#",
      "tsc -p . --noEmit"
    ]
    // ^ You can also specify an array
    // Notice how tsc doesn't have #FILES#? It lints the entire project!
  }
}

Accepted values in lint-unpushed is Record<string, string|string[]>. You can place #FILES# anywhere, as many times as you want inside the command string. It'll be replaced with paths of files changed when the command is executed.

License

This project is licensed under the terms of MIT License. See the License file for more info.

0.5.2

4 years ago

0.5.1

4 years ago

0.5.0

4 years ago

0.5.0-beta3

4 years ago

0.5.0-beta1

4 years ago

0.5.0-beta2

4 years ago

0.4.0

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago