Skip to content

Commit

Permalink
fix: 修复git钩子校验 (#20)
Browse files Browse the repository at this point in the history
* fix: 修复git钩子校验

* fix: 修复git钩子校验
  • Loading branch information
TinsFox committed Dec 17, 2021
1 parent a3bf029 commit d577ce4
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 34 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ packages/devui-vue/devui/vue-devui.ts
packages/devui-vue/devui/theme/theme.scss
packages/devui-vue/docs/.vitepress/config/sidebar.ts
packages/devui-vue/docs/.vitepress/config/enSidebar.ts

yarn.lock
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

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

npx @ls-lint/ls-lint && npx lint-staged
File renamed without changes.
File renamed without changes.
File renamed without changes.
27 changes: 23 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,31 @@
"scripts": {
"dev": "lerna exec --scope vue-devui yarn dev",
"build": "lerna exec --scope vue-devui yarn build",
"build:lib": "lerna exec --scope vue-devui yarn build:lib"
"build:lib": "lerna exec --scope vue-devui yarn build:lib",
"prepare": "husky install",
"precommit": "lint-staged",
"lint:fix": "eslint --fix \"{packages}/**/*.{vue,js,ts,jsx,tsx}\"",
"stylelint": "stylelint --fix \"{packages}/**/*.{scss,css}\""
},
"devDependencies": {
"lerna": "^4.0.0"
"lerna": "^4.0.0",
"husky": "^7.0.4",
"@ls-lint/ls-lint": "^1.10.0",
"esbuild-register": "^2.6.0",
"eslint": "^7.28.0",
"eslint-plugin-import": "^2.24.2",
"eslint-plugin-vue": "^7.11.1",
"stylelint": "^13.13.1",
"stylelint-config-recommended-scss": "^4.3.0",
"stylelint-config-standard": "^22.0.0",
"stylelint-scss": "^3.20.1",
"lint-staged": "^11.0.0"
},
"workspaces": [
"packages/*"
]
}
],
"lint-staged": {
".{js,ts,jsx,tsx,vue}": "eslint --fix",
".{scss,css}": "stylelint --fix"
}
}
4 changes: 0 additions & 4 deletions packages/devui-vue/.husky/commit-msg

This file was deleted.

4 changes: 0 additions & 4 deletions packages/devui-vue/.husky/pre-commit

This file was deleted.

22 changes: 1 addition & 21 deletions packages/devui-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,14 @@
"app:build": "vite build",
"build:lib": "yarn predev && yarn build:components && yarn copy",
"test": "jest --config jest.config.js",
"ls-lint": "ls-lint",
"lint": "eslint \"{src,devui}/**/*.{vue,js,ts,jsx,tsx}\"",
"lint:fix": "eslint --fix \"{src,devui}/**/*.{vue,js,ts,jsx,tsx}\"",
"stylelint": "stylelint --fix \"{devui,src}/**/*.{scss,css}\"",
"build:components": "node ./devui-cli/index.js build",
"generate:theme": "node ./devui-cli/index.js generate:theme",
"generate:dts": "node ./devui-cli/index.js generate:dts",
"copy": "cp package.json build && cp ../../README.md build && cp devui/theme/theme.scss build/theme",
"clean:cli": "npm uninstall -g devui-cli & npm uninstall -g vue-devui",
"cli:create": "node ./devui-cli/index.js create -t component",
"predev": "node ./devui-cli/index.js create -t vue-devui --ignore-parse-error",
"prebuild": "node ./devui-cli/index.js create -t vue-devui --ignore-parse-error",
"prepare": "cd ../.. && husky install packages/devui-vue/.husky"
"prebuild": "node ./devui-cli/index.js create -t vue-devui --ignore-parse-error"
},
"dependencies": {
"@devui-design/icons": "^1.3.0",
Expand All @@ -59,7 +54,6 @@
"@babel/traverse": "^7.15.4",
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@ls-lint/ls-lint": "^1.10.0",
"@types/chalk": "^2.2.0",
"@types/commander": "^2.12.2",
"@types/jest": "^26.0.23",
Expand All @@ -76,22 +70,12 @@
"babel-jest": "^27.0.2",
"chalk": "^4.1.2",
"commander": "^8.1.0",
"esbuild-register": "^2.6.0",
"eslint": "^7.28.0",
"eslint-plugin-import": "^2.24.2",
"eslint-plugin-vue": "^7.11.1",
"husky": "^7.0.4",
"inquirer": "^8.1.2",
"jest": "^27.0.4",
"lint-staged": "^11.0.0",
"ora": "^5.4.1",
"patch-vue-directive-ssr": "^0.0.1",
"sass": "^1.32.2",
"shelljs": "^0.8.4",
"stylelint": "^13.13.1",
"stylelint-config-recommended-scss": "^4.3.0",
"stylelint-config-standard": "^22.0.0",
"stylelint-scss": "^3.20.1",
"typescript": "^4.3.2",
"vite": "^2.4.4",
"vite-plugin-md": "^0.6.0",
Expand All @@ -100,9 +84,5 @@
"vitepress-theme-demoblock": "1.3.2",
"vue-tsc": "^0.2.2",
"yarn": "^1.22.11"
},
"lint-staged": {
"{src,devui}/**/*.{js,ts,jsx,tsx,vue}": "eslint --fix",
"{src,devui}/**/*.{scss,css}": "stylelint --fix"
}
}

0 comments on commit d577ce4

Please sign in to comment.