# s_2006A_shixun **Repository Path**: ZXH-zxhzxh/s_2006A_shixun ## Basic Information - **Project Name**: s_2006A_shixun - **Description**: 2006A 实训项目汇总 - **Primary Language**: JavaScript - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 60 - **Created**: 2023-02-27 - **Last Updated**: 2023-03-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # platform-app ## github flow ## vis Code 1. 下载 Editor Config 2. .editorconfig ```js # http://editorconfig.org root = true [*] # 表示所有文件适用 charset = utf-8 # 设置文件字符集为 utf-8 indent_style = space # 缩进风格(tab | space) indent_size = 2 # 缩进大小 end_of_line = lf # 控制换行类型(lf | cr | crlf) trim_trailing_whitespace = true # 去除行首的任意空白字符 insert_final_newline = true # 始终在文件末尾插入一个新行 [*.md] # 表示仅 md 文件适用以下规则 max_line_length = off trim_trailing_whitespace = false ``` 3. Prettier- code formatter (用户区) ## git 规范化配置 + eslint `参考文档:https://blog.csdn.net/weixin_47980825/article/details/127473686` ### 一、husky 可以帮助我们在 执行 git commit 提交的时候,按照 eslint 规范进行修复代码。 husky 是一个 git hook 工具,可以帮助我们触发 git 提交的各个阶段:pre-commit、commit-msg、pre-push 支持所有的 Git 钩子 ```js npx husky-init && npm install ``` ### 二、commitizen `定义:是一个帮助我们编写规范 commit message 的工具。` 1. 安装 > npm install commitizen -D 2. 安装 log: cz-conventional-changelog > npx commitizen init cz-conventional-changelog --save-dev --save-exact 3. 安装 commitLint,防止用户跳过不规范提交 > 3. 安装 npm i @commitlint/config-conventional @commitlint/cli -D ```js // commitlint.config.js module.exports = { extends: ['@commitlint/config-conventional'] } ``` ### 通过以上安装,git 提交模式代码如下: ```js // git 提交步骤: npm run cz git pull git push ```