Skip to content

Commit d056fa8

Browse files
authored
fix(deps): update husky package to the latest (#403)
1 parent d11e1dd commit d056fa8

File tree

6 files changed

+37
-233
lines changed

6 files changed

+37
-233
lines changed

.husky/commit-msg

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+
commitlint -E HUSKY_GIT_PARAMS

.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+
npm test

.husky/pre-push

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+
npm run format

README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ Linting and formatting configuration shared by Netlify Node.js repositories:
77
- [Prettier](https://prettier.io/)
88
- [Editorconfig](https://editorconfig.org/)
99
- `.gitattributes`
10+
- `.husky/`
1011

1112
## How to add to a new Node.js repository
1213

1314
If you're creating a new repository, you can use the
1415
[following GitHub template](https://github.com/netlify/node-template). Otherwise, please follow those steps:
1516

16-
- `npm install -D @netlify/eslint-config-node husky@4`
1717
- Add a `.eslintrc.js` file to the root of the project. Based on the type of the project update the content of the file:
1818

1919
### Node.js project
@@ -87,12 +87,6 @@ module.exports = { extends: ['@commitlint/config-conventional'] }
8787
"config": {
8888
"eslint": "--ignore-path .gitignore --cache --format=codeframe --max-warnings=0 \"{src,scripts,tests,.github}/**/*.{js,md,html}\" \"*.{js,md,html}\" \".*.{js,md,html}\"",
8989
"prettier": "--ignore-path .gitignore --loglevel=warn \"{src,scripts,tests,.github}/**/*.{js,md,yml,json,html}\" \"*.{js,yml,json,html}\" \".*.{js,yml,json,html}\" \"!package-lock.json\""
90-
},
91-
"husky": {
92-
"hooks": {
93-
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
94-
"pre-push": "npm run format"
95-
}
9690
}
9791
}
9892
```

0 commit comments

Comments
 (0)