From ccac3123039ae61518a7c75bb3b61bf92af5d382 Mon Sep 17 00:00:00 2001 From: Valentin Kiselev Date: Sat, 21 Dec 2024 11:24:06 +0300 Subject: [PATCH] docs: add an example with a whole script in a run --- docs/mdbook/configuration/run.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/mdbook/configuration/run.md b/docs/mdbook/configuration/run.md index 8d78148c..cf63547e 100644 --- a/docs/mdbook/configuration/run.md +++ b/docs/mdbook/configuration/run.md @@ -168,3 +168,17 @@ pre-commit: # Will quote where needed with single quotes run: yarn test {staged_files} # will run `yarn eslint file1.js file2.js '[strange name].spec.js'` ``` + +#### Scripts + +```yml +# lefthook.yml + +pre-commit: + jobs: + - name: a whole script in a run + run: | + for file in $(ls .); do + yarn lint $file + done +```