Add husky pre-commit formatting
This commit is contained in:
parent
2eea77ebdb
commit
7e9b89b20b
3 changed files with 23 additions and 1 deletions
4
.husky/pre-commit
Executable file
4
.husky/pre-commit
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
npm run format
|
16
package-lock.json
generated
16
package-lock.json
generated
|
@ -24,6 +24,7 @@
|
|||
"eslint": "^8.40.0",
|
||||
"eslint-config-next": "^13.4.2",
|
||||
"eslint-config-prettier": "^8.8.0",
|
||||
"husky": "^8.0.3",
|
||||
"prettier": "^2.8.8"
|
||||
}
|
||||
},
|
||||
|
@ -2686,6 +2687,21 @@
|
|||
"node": ">=14.18.0"
|
||||
}
|
||||
},
|
||||
"node_modules/husky": {
|
||||
"version": "8.0.3",
|
||||
"resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz",
|
||||
"integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"husky": "lib/bin.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/typicode"
|
||||
}
|
||||
},
|
||||
"node_modules/ignore": {
|
||||
"version": "5.2.4",
|
||||
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint",
|
||||
"format": "prettier --write app/ components/"
|
||||
"format": "prettier --write app/ components/",
|
||||
"prepare": "husky install"
|
||||
},
|
||||
"dependencies": {
|
||||
"@radix-ui/react-dropdown-menu": "^2.0.4",
|
||||
|
@ -26,6 +27,7 @@
|
|||
"eslint": "^8.40.0",
|
||||
"eslint-config-next": "^13.4.2",
|
||||
"eslint-config-prettier": "^8.8.0",
|
||||
"husky": "^8.0.3",
|
||||
"prettier": "^2.8.8"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue