# test **Repository Path**: fanlichuan/test ## Basic Information - **Project Name**: test - **Description**: 这是一个测试仓库,练习git的使用,加深对各种命令的理解 - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-07-07 - **Last Updated**: 2024-05-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 参考链接: 掘金: https://juejin.cn/post/7261862616095146042 # 一、git 提交规范检查 npm i husky -D npx husky install npx husky add .husky/pre-commit "npm run lint" //提交前进行校验 npx husky add .husky/commit-msg 'npx husky commitlint --edit "$1"' npm i @commitlint/cli @commitlint/config-conventional -D 添加 commitlint.config.js 文件:配置略。 npm i lint-staged stylelint stylelint-config-standard -D 添加 .lintstagedrc 配置文件及依赖: ```js { "*.{js,ts,vue}": ["npm run lint"], "*.{html,vue,css,scss,sass,less}": ["stylelint --fix"] } ``` //cz-customizable 是一个帮助书写 commit message 的工具,而 commitlint 是一个校验 commit message 的工具 npm i cz-customizable -D