mirror of
https://github.com/scratchfoundation/eslint-config-scratch.git
synced 2025-08-28 22:40:13 -04:00
chore: add husky hook for commitlint
This commit is contained in:
parent
5c4b474124
commit
1766fe4d4a
4 changed files with 31 additions and 2 deletions
1
.husky/.gitattributes
vendored
Normal file
1
.husky/.gitattributes
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
* text eol=lf
|
4
.husky/commit-msg
Executable file
4
.husky/commit-msg
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
npx --no-install commitlint --edit "$1"
|
24
package-lock.json
generated
24
package-lock.json
generated
|
@ -12,7 +12,8 @@
|
|||
"@babel/eslint-parser": "7.17.0",
|
||||
"@commitlint/cli": "17.1.2",
|
||||
"@commitlint/config-conventional": "17.1.0",
|
||||
"eslint": "8.15.0"
|
||||
"eslint": "8.15.0",
|
||||
"husky": "8.0.1"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"eslint-plugin-react": ">=7.27.0"
|
||||
|
@ -2457,6 +2458,21 @@
|
|||
"node": ">=10.17.0"
|
||||
}
|
||||
},
|
||||
"node_modules/husky": {
|
||||
"version": "8.0.1",
|
||||
"resolved": "https://registry.npmjs.org/husky/-/husky-8.0.1.tgz",
|
||||
"integrity": "sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"husky": "lib/bin.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/typicode"
|
||||
}
|
||||
},
|
||||
"node_modules/ignore": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz",
|
||||
|
@ -6188,6 +6204,12 @@
|
|||
"integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",
|
||||
"dev": true
|
||||
},
|
||||
"husky": {
|
||||
"version": "8.0.1",
|
||||
"resolved": "https://registry.npmjs.org/husky/-/husky-8.0.1.tgz",
|
||||
"integrity": "sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw==",
|
||||
"dev": true
|
||||
},
|
||||
"ignore": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz",
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"description": "Shareable ESLint config for Scratch",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"prepare": "husky install",
|
||||
"test": "eslint ."
|
||||
},
|
||||
"eslintConfig": {
|
||||
|
@ -35,7 +36,8 @@
|
|||
"@babel/eslint-parser": "7.17.0",
|
||||
"@commitlint/cli": "17.1.2",
|
||||
"@commitlint/config-conventional": "17.1.0",
|
||||
"eslint": "8.15.0"
|
||||
"eslint": "8.15.0",
|
||||
"husky": "8.0.1"
|
||||
},
|
||||
"config": {
|
||||
"commitizen": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue