Skip to content

Commit d241635

Browse files
committed
Add pre-commit hook to check code formatting & linting
1 parent d60b61c commit d241635

File tree

5 files changed

+319
-2
lines changed

5 files changed

+319
-2
lines changed

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx lint-staged

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Project setup uses:
88
- [ESLint](https://eslint.org/) for code linting
99
- [Jest](https://jestjs.io/) for testing
1010
- vscode settings to run Prettier & ESLint on save
11+
- Pre-commit hook using [husky](https://typicode.github.io/husky/) [lint-staged](https://github.com/okonet/lint-staged) to ckeck code formatting & linting (Prettier & EsLint)
1112

1213
## Installation & usage
1314

0 commit comments

Comments
 (0)