lint-staged-sh

lint-staged-sh [0.x]

Except bugs, errors and/or strange behavior

Zero-{dependency,config,install,file} single-file lint-staged posix shell script

List of contents:

Installation

This project can be installed many ways but here we’ll provide some ways

First-time installation

curl -fsSLO https://raw.githubusercontent.com/dalisoft/lint-staged-sh/master/lint-staged.sh
chmod +x ./lint-staged.sh

Husky integration

mv ./lint-staged.sh .husky/pre-commit

Lefthook

mkdir -p .lefthook
mv ./lint-staged.sh .lefthook/pre-commit/lint-staged.sh

then add .lefthook folder to your git and add this to your lefthook configuration

pre-commit:
  scripts:
    "lint-staged.sh":
      runner: sh

Linter dependencies

Install as dependency or as a global dependency one, some or all of those linters to use them. lint-staged-sh detects smartly if it available