Skip to content

Commit

Permalink
Add lint-staged and husky for precommit linting. (primer#1727)
Browse files Browse the repository at this point in the history
* Add lint-staged

* Add HUSKY_ENABLED env variable
  • Loading branch information
pksjce authored Jan 4, 2022
1 parent 03584e0 commit e051a20
Show file tree
Hide file tree
Showing 4 changed files with 37,643 additions and 77 deletions.
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
6 changes: 6 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

[ -z "$HUSKY_ENABLED" ] && exit 0

npx lint-staged
Loading

0 comments on commit e051a20

Please sign in to comment.