Skip to content

Commit f4aaf20

Browse files
authored
init commitizen + fix husk pre-commit (#22)
1 parent 973ec5f commit f4aaf20

File tree

5 files changed

+461
-28
lines changed

5 files changed

+461
-28
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module.exports = {
33
env: {
44
node: true,
55
},
6+
ignorePatterns: ['node_modules/**/*', 'ios/**/*', 'android/**/*', 'dist/**/*', '.yarn/**/*'],
67
extends: ['plugin:vue/vue3-essential', 'eslint:recommended', '@vue/typescript/recommended'],
78
parserOptions: {
89
ecmaVersion: 2020,

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
yarn run lint

.husky/prepare-commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
exec < /dev/tty && npx cz --hook || true

package.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@
1010
"lint": "eslint .",
1111
"fmt": "eslint . --fix"
1212
},
13-
"husky": {
14-
"hooks": {
15-
"pre-commit": "npm run lint"
16-
}
17-
},
1813
"prettier": "@ionic/prettier-config",
1914
"dependencies": {
2015
"@capacitor/android": "^3.5.1",
@@ -57,7 +52,9 @@
5752
"@yarnpkg/pnpify": "^4.0.0-rc.3",
5853
"autoprefixer": "^10.4.5",
5954
"babel-jest": "^27.3.1",
55+
"commitizen": "^4.2.4",
6056
"cypress": "^9.6.0",
57+
"cz-conventional-changelog": "3.3.0",
6158
"eslint": "^8.15.0",
6259
"eslint-config-prettier": "^8.5.0",
6360
"eslint-plugin-cypress": "^2.12.1",
@@ -79,5 +76,10 @@
7976
"vue-jest": "^3.0.7",
8077
"vue-tsc": "^0.34.7"
8178
},
82-
"description": "example App"
79+
"description": "example App",
80+
"config": {
81+
"commitizen": {
82+
"path": "./node_modules/cz-conventional-changelog"
83+
}
84+
}
8385
}

0 commit comments

Comments
 (0)