Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
穆春红
/
frontend-hub
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
976471f9
authored
Jun 18, 2026
by
chunhong.mu
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
chore: 添加 husky git 钩子配置
parents
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
.husky/commit-msg
.husky/pre-commit
.husky/commit-msg
0 → 100644
View file @
976471f9
#!/usr/bin/env sh
(
# 检查是否在 git 目录
if
[
-z
"
$GIT_DIR
"
]
;
then
GIT_DIR
=
$(
git rev-parse
--git-dir
)
fi
# 运行 commitlint
npx
--no
--
commitlint
--edit
${
1
}
)
.husky/pre-commit
0 → 100644
View file @
976471f9
#!/usr/bin/env sh
(
# 检查是否在 git 目录
if
[
-z
"
$GIT_DIR
"
]
;
then
GIT_DIR
=
$(
git rev-parse
--git-dir
)
fi
# 运行 lint-staged
npx lint-staged
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment