Skip to content

Commit

Permalink
Updates for husky v9.0 and v9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
david-yz-liu committed Aug 3, 2024
1 parent 31ec969 commit 74beba1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
5 changes: 1 addition & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
lint-staged
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,7 @@ For more information, check out the project [documentation website](https://www.
5. Install the pre-commit hooks to automatically format your code when you make commits:

```console
$ npx husky install
$ npm pkg set scripts.prepare="husky install"
$ npx husky add .husky/pre-commit "npx lint-staged"
$ npx husky init
```

### Automatic Javascript compilation
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"scripts": {
"prepare": "husky install",
"prepare": "husky",
"test": "jest --no-cache",
"test-cov": "jest --no-cache --coverage"
},
Expand Down

0 comments on commit 74beba1

Please sign in to comment.