Skip to content

Commit

Permalink
fix(deps): update husky package to the latest (#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR authored Jan 12, 2022
1 parent d11e1dd commit d056fa8
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 233 deletions.
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

commitlint -E HUSKY_GIT_PARAMS
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm test
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run format
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ Linting and formatting configuration shared by Netlify Node.js repositories:
- [Prettier](https://prettier.io/)
- [Editorconfig](https://editorconfig.org/)
- `.gitattributes`
- `.husky/`

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

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

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

### Node.js project
Expand Down Expand Up @@ -87,12 +87,6 @@ module.exports = { extends: ['@commitlint/config-conventional'] }
"config": {
"eslint": "--ignore-path .gitignore --cache --format=codeframe --max-warnings=0 \"{src,scripts,tests,.github}/**/*.{js,md,html}\" \"*.{js,md,html}\" \".*.{js,md,html}\"",
"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\""
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-push": "npm run format"
}
}
}
```
Expand Down
Loading

0 comments on commit d056fa8

Please sign in to comment.