Skip to content

Commit fce118e

Browse files
committed
chore(package.json): better dev tools
1 parent 049fb47 commit fce118e

File tree

4 files changed

+1256
-20
lines changed

4 files changed

+1256
-20
lines changed

.husky/commit-msg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
yarn commitlint --edit
4+
yarn commitlint --edit $1

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
yarn lint-staged

package.json

+16-1
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,20 @@
1010
"dev": "concurrently \"cd frontend && cross-env FAST_REFRESH=true yarn start\" \"cd backend && cross-env NODE_ENV=development ZU_DEFAULT_USERNAME=admin ZU_DEFAULT_PASSWORD=zero-ui nodemon ./bin/www --ignore data/db.json\"",
1111
"build": "cd frontend && cross-env INLINE_RUNTIME_CHUNK=false GENERATE_SOURCEMAP=false yarn build",
1212
"prod": "cd backend && cross-env NODE_ENV=production ZU_SECURE_HEADERS=false yarn start",
13-
"release": "standard-version && git push --follow-tags origin main"
13+
"release": "standard-version && git push --follow-tags origin main",
14+
"commit": "yarn git-cz"
1415
},
1516
"devDependencies": {
1617
"@commitlint/cli": "^12.0.1",
1718
"@commitlint/config-conventional": "^12.0.1",
19+
"commitizen": "^4.2.3",
1820
"concurrently": "^6.0.0",
1921
"cross-env": "^7.0.3",
22+
"cz-conventional-changelog": "^3.3.0",
2023
"husky": "^5.1.3",
24+
"lint-staged": "^10.5.4",
2125
"nodemon": "^2.0.7",
26+
"prettier": "^2.2.1",
2227
"rimraf": "^3.0.2",
2328
"standard-version": "^9.1.1"
2429
},
@@ -32,5 +37,15 @@
3237
"extends": [
3338
"@commitlint/config-conventional"
3439
]
40+
},
41+
"config": {
42+
"commitizen": {
43+
"path": "cz-conventional-changelog"
44+
}
45+
},
46+
"lint-staged": {
47+
"*.{tsx,ts,js,jsx,scss,css,js,json,md}": [
48+
"yarn prettier --write"
49+
]
3550
}
3651
}

0 commit comments

Comments
 (0)