Skip to content

chore: setup lefthook

Paul Gascou-Vaillancourt requested to merge setup-lefthook into main

Setup lefthook to run ESLint and Prettier on staged files, and to lint Markdown files when committing changes.

How to test this?

  1. Checkout this branch.
  2. Run yarn to initialize lefthook.
  3. Stage some file that contains formatting errors. For example: echo -n "no newline at end of file" > badfile.md && git add badfile.md.
  4. Try committing the file git commit -m "This will not work :(".

Lefthook should abort the commit.

Edited by Paul Gascou-Vaillancourt

Merge request reports

Loading