Skip to content

Commit e051a20

Browse files
authored
Add lint-staged and husky for precommit linting. (#1727)
* Add lint-staged * Add HUSKY_ENABLED env variable
1 parent 03584e0 commit e051a20

File tree

4 files changed

+37643
-77
lines changed

4 files changed

+37643
-77
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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
[ -z "$HUSKY_ENABLED" ] && exit 0
5+
6+
npx lint-staged

0 commit comments

Comments
 (0)