From d103b4e386228b2523ad62ebad12fe7d9ab5a24e Mon Sep 17 00:00:00 2001 From: markthree <1801982702@qq.com> Date: Tue, 12 Apr 2022 13:45:53 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E8=A1=A5=E5=85=85=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E8=A7=84=E8=8C=83=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4b5cc17..ada9ba7 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ 25. tsx 支持 26. gzip 资源压缩支持 27. 环境变量配置支持 +28. 统一的代码规范与风格支持

@@ -239,6 +240,22 @@ pnpm i # 或者 yarn ``` +13. 代码规范校验 + +```shell +pnpm lint + +# 或者 npm run lint +# 或者 yarn lint + +# 校验时修复 + +pnpm lint:fix + +# 或者 npm run lint:fix +# 或者 yarn lint:fix +``` +

@@ -1155,7 +1172,6 @@ export default defineComponent({ 具体可见 👉 [vite-plugin-compression](https://github.com/vbenjs/vite-plugin-compression) -


@@ -1163,6 +1179,15 @@ export default defineComponent({ 根目录下有三个环境变量配置文件 `.env`,`.env.development` 和 `.env.production` 用来对项目进行配置。 +
+
+ +### 28. 统一的代码规范与风格支持 + +由 [eslint](https://github.com/eslint/eslint) 提供的代码规范校验,使用 [prettier](https://github.com/prettier/prettier) 统一代码风格。 + +由 [husky](https://github.com/typicode/husky) + [lint-staged](https://github.com/okonet/lint-staged) 提供的 `commit` 时校验。 +