Skip to content

Commit

Permalink
fix: 引入lint-staged格式化提交内容,修复git提交前hooks执行异常 (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmdapl committed Nov 3, 2023
1 parent 324a422 commit 97689ab
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// 参考: https://www.npmjs.com/package/lint-staged#configuration
module.exports = {
"*.*": "./scripts/lint"
}
2 changes: 2 additions & 0 deletions docs/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ title: 快速开始
permalink: /quick-start.html
headerDepth: 2
---
# 快速开始

<!-- @include: ../README.md#quick-start -->
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"scripts": {
"preinstall": "chmod +x ./scripts/*",
"prepare": "rm -f .husky/pre-commit && husky install && npx husky add .husky/pre-commit \"./scripts/lint\" && chmod +x .husky/pre-commit",
"prepare": "rm -f .husky/pre-commit && husky install && npx husky add .husky/pre-commit \"npx lint-staged && git add .\" && chmod +x .husky/pre-commit",
"dev": "vuepress dev docs",
"build": "vuepress build docs",
"build:proxy": "./scripts/bundle build_proxy",
Expand Down Expand Up @@ -40,6 +40,7 @@
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-vue": "^9.17.0",
"husky": "^8.0.3",
"lint-staged": "^15.0.2",
"markdownlint-cli": "^0.37.0",
"markmap-cli": "^0.15.4",
"shelljs": "^0.8.5",
Expand Down
87 changes: 87 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 97689ab

Please sign in to comment.