# lint-unpushed

> Lint code before it's pushed

Latest version **0.5.2** (published 2020-11-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install lint-unpushed
pnpm add lint-unpushed
yarn add lint-unpushed
bun add lint-unpushed
```

Provides the commands `lint-unpushed-install`, `lint-unpushed-pre-push`, `lint-unpushed-post-checkout`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.2 |
| Published | 2020-11-03 |
| First published | 2020-04-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 10 |
| Dependencies | 5 |
| Unpacked size | 19.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | steelbrain |
| Maintainers | steelbrain |

## Links

- npm: https://www.npmjs.com/package/lint-unpushed
- Repository: https://github.com/steelbrain/lint-unpushed
- Homepage: https://github.com/steelbrain/lint-unpushed#readme
- Issues: https://github.com/steelbrain/lint-unpushed/issues
- npm.io page: https://npm.io/package/lint-unpushed

## Dependencies (5)

- [rxjs](https://npm.io/package/rxjs.md) ^6.6.3
- [listr](https://npm.io/package/listr.md) ^0.14.3
- [micromatch](https://npm.io/package/micromatch.md) ^4.0.2
- [shell-escape](https://npm.io/package/shell-escape.md) ^0.2.0
- [@steelbrain/spawn](https://npm.io/package/@steelbrain/spawn.md) ^0.2.0

## Recent versions

- 0.5.2 (latest) — 2020-11-03
- 0.5.1 — 2020-11-03
- 0.5.0 — 2020-11-03
- 0.4.0 — 2020-08-03
- 0.3.0 — 2020-06-22
- 0.2.0 — 2020-04-24
- 0.1.1 — 2020-04-20
- 0.1.0 — 2020-04-20

## README

# 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:

```json5
// 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

```json5
// 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.

---
_Source: https://npm.io/package/lint-unpushed · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
