Skip to content

Commit

Permalink
feat(custom): 新增工程化配置
Browse files Browse the repository at this point in the history
  • Loading branch information
shinetingli committed Feb 16, 2023
1 parent 0feb19b commit 273af66
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ module.exports = {
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-typescript',
'@vue/eslint-config-prettier'
'@vue/eslint-config-prettier',
'prettier'
],
parserOptions: {
ecmaVersion: 'latest'
Expand Down
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no-install commitlint --edit "$1"
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
5 changes: 5 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default {
extends: ["@commitlint/config-conventional"],
ignores: [(commit) => /Merge/.test(commit)],
defaultIgnores: true,
};
18 changes: 15 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-draggable-tree-next",
"version": "1.0.7",
"version": "1.0.8",
"description": "The json tree built based on vue3 supports node dragging, adding, editing and deleting, etc.",
"author": {
"name": "TingShine",
Expand Down Expand Up @@ -41,7 +41,14 @@
"build-only": "vite build",
"type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"commit": "git-cz"
"commit": "git-cz",
"prepare": "husky install"
},
"lint-staged": {
"*.{js,jsx,vue,ts,tsx}": [
"prettier --write",
"eslint --max-warnings 0 --fix"
]
},
"dependencies": {
"tdesign-icons-vue-next": "^0.1.7",
Expand All @@ -50,6 +57,7 @@
"vuedraggable": "^4.1.0"
},
"devDependencies": {
"@commitlint/config-conventional": "^17.4.3",
"@rushstack/eslint-patch": "^1.1.4",
"@types/jsdom": "^20.0.1",
"@types/node": "^18.11.12",
Expand All @@ -61,9 +69,12 @@
"@vue/tsconfig": "^0.1.3",
"autoprefixer": "^10.4.13",
"commitizen": "^4.3.0",
"commitlint": "^17.4.3",
"cz-customizable": "^7.0.0",
"eslint": "^8.22.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-vue": "^9.3.0",
"husky": "^8.0.0",
"jsdom": "^20.0.3",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.21",
Expand All @@ -81,7 +92,8 @@
"tdesign-vue-next": "^1.0.4",
"vue": "^3.2.45",
"tdesign-icons-vue-next": "^0.1.7"
} ,"config": {
},
"config": {
"commitizen": {
"path": "node_modules/cz-customizable"
}
Expand Down

0 comments on commit 273af66

Please sign in to comment.