feat: 添加commit校验
This commit is contained in:
parent
5aeeda5433
commit
3fba23e19f
|
@ -0,0 +1,28 @@
|
|||
module.exports = {
|
||||
extends: ['@commitlint/config-conventional'],
|
||||
rules: {
|
||||
'type-enum': [
|
||||
2,
|
||||
'always',
|
||||
[
|
||||
'build', // 编译相关修改(新版本发布)
|
||||
'feat', // 新功能
|
||||
'fix', // 修复bug
|
||||
'update', // 更新某功能
|
||||
'refactor', // 重构
|
||||
'docs', // 文档
|
||||
'chore', // 增加依赖或库
|
||||
'style', // 格式(不影响代码变动)
|
||||
'revert', // 撤销commit 回滚上一版本
|
||||
'perf', // 性能优化
|
||||
]
|
||||
],
|
||||
'type-case': [0],
|
||||
'type-empty': [0],
|
||||
'scope-empty': [0],
|
||||
'scope-case': [0],
|
||||
'subject-full-stop': [0, 'never'],
|
||||
'subject-case': [0, 'never'],
|
||||
'header-max-length': [0, 'always', 72]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
npx --no -- commitlint --edit ${1}
|
|
@ -1,22 +1,22 @@
|
|||
// generated by unplugin-vue-components
|
||||
// We suggest you to commit this file into source control
|
||||
// Read more: https://github.com/vuejs/core/pull/3399
|
||||
import '@vue/runtime-core'
|
||||
import '@vue/runtime-core';
|
||||
|
||||
export {}
|
||||
export {};
|
||||
|
||||
declare module '@vue/runtime-core' {
|
||||
export interface GlobalComponents {
|
||||
ACard: typeof import('ant-design-vue/es')['Card']
|
||||
ACol: typeof import('ant-design-vue/es')['Col']
|
||||
ARow: typeof import('ant-design-vue/es')['Row']
|
||||
ATooltip: typeof import('ant-design-vue/es')['Tooltip']
|
||||
BadgeStatus: typeof import('./src/components/BadgeStatus/index.vue')['default']
|
||||
CardBox: typeof import('./src/components/CardBox/index.vue')['default']
|
||||
GeoComponent: typeof import('./src/components/GeoComponent/index.vue')['default']
|
||||
MonacoEditor: typeof import('./src/components/MonacoEditor/index.vue')['default']
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
ValueItem: typeof import('./src/components/ValueItem/index.vue')['default']
|
||||
}
|
||||
export interface GlobalComponents {
|
||||
ACard: typeof import('ant-design-vue/es')['Card'];
|
||||
ACol: typeof import('ant-design-vue/es')['Col'];
|
||||
ARow: typeof import('ant-design-vue/es')['Row'];
|
||||
ATooltip: typeof import('ant-design-vue/es')['Tooltip'];
|
||||
BadgeStatus: typeof import('./src/components/BadgeStatus/index.vue')['default'];
|
||||
CardBox: typeof import('./src/components/CardBox/index.vue')['default'];
|
||||
GeoComponent: typeof import('./src/components/GeoComponent/index.vue')['default'];
|
||||
MonacoEditor: typeof import('./src/components/MonacoEditor/index.vue')['default'];
|
||||
RouterLink: typeof import('vue-router')['RouterLink'];
|
||||
RouterView: typeof import('vue-router')['RouterView'];
|
||||
ValueItem: typeof import('./src/components/ValueItem/index.vue')['default'];
|
||||
}
|
||||
}
|
||||
|
|
19
package.json
19
package.json
|
@ -8,7 +8,9 @@
|
|||
"build": "vite build --mode production",
|
||||
"preview": "vite preview",
|
||||
"eslint": "eslint --ext .js,.vue --ignore-path .gitignore --fix src",
|
||||
"prettier": "prettier --write"
|
||||
"lint": "eslint src --fix --ext .ts,.tsx,.vue,.js,.jsx",
|
||||
"prettier": "prettier --write",
|
||||
"prepare": "husky install"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vuemap/vue-amap": "^1.1.20",
|
||||
|
@ -26,16 +28,31 @@
|
|||
"vue-router": "^4.1.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^17.4.1",
|
||||
"@commitlint/config-conventional": "^17.4.0",
|
||||
"@types/lodash-es": "^4.17.6",
|
||||
"@types/moment": "^2.13.0",
|
||||
"@types/node": "^18.11.17",
|
||||
"@vitejs/plugin-vue": "^4.0.0",
|
||||
"@vuemap/unplugin-resolver": "^1.0.4",
|
||||
"autoprefixer": "^10.4.13",
|
||||
"commitlint": "^17.4.1",
|
||||
"husky": "^8.0.0",
|
||||
"lint-staged": "^13.1.0",
|
||||
"mrm": "^4.1.13",
|
||||
"prettier": "^2.8.1",
|
||||
"typescript": "^4.9.3",
|
||||
"vite": "^4.0.0",
|
||||
"vite-plugin-html": "^3.2.0",
|
||||
"vue-tsc": "^1.0.11"
|
||||
},
|
||||
"lint-staged": {
|
||||
"**/*.{vue,js,jsx,ts,tsx}": [
|
||||
"npm run lint",
|
||||
"prettier --write"
|
||||
],
|
||||
"**/*.{html,css,less,md}": [
|
||||
"prettier --write"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue