We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
husky
lint-staged
commitlint
可以帮助我们在 commit 前,对代码和 commit messages 进行 lint
commit
commit messages
lint
Git Hooks
git
git commit messages
yarn add -D husky lint-staged @commitlint/cli @commitlint/config-conventional commitizen cz-conventional-changelog
package.json
{ "...": "...", "scripts": { "commit": "git-cz" }, "husky": { "hooks": { "pre-commit": "lint-staged", "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" } }, "lint-staged": { "src/**/*.{js,ts,tsx}": ["eslint --fix", "prettier --write", "git add"] }, "config": { "commitizen": { "path": "cz-conventional-changelog" } } }
commitlint.config.js
module.exports = { extends: ['@commitlint/config-conventional'] }
@commitlint/config-conventional
The text was updated successfully, but these errors were encountered:
No branches or pull requests
使用
husky
、lint-staged
、commitlint
构建前端工作流作用
可以帮助我们在
commit
前,对代码和commit messages
进行lint
介绍
Git Hooks
工具,让你操作Git Hooks
变得更容易git
暂存文件运行lint
从而提高速度git commit messages
是否符合规范安装
使用
package.json
commitlint.config.js
@commitlint/config-conventional
type 说明The text was updated successfully, but these errors were encountered: