Skip to content

Commit

Permalink
docs: 补充代码规范说明
Browse files Browse the repository at this point in the history
  • Loading branch information
markthree committed Apr 12, 2022
1 parent 5724208 commit d103b4e
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
25. tsx 支持
26. gzip 资源压缩支持
27. 环境变量配置支持
28. 统一的代码规范与风格支持

<br />
<br />
Expand Down Expand Up @@ -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
```

<br />
<br />

Expand Down Expand Up @@ -1155,14 +1172,22 @@ export default defineComponent({
具体可见 👉 [vite-plugin-compression](https://github.com/vbenjs/vite-plugin-compression)
<br />
<br />
<br />
### 27. [环境变量配置支持](https://cn.vitejs.dev/guide/env-and-mode.html)
根目录下有三个环境变量配置文件 `.env``.env.development``.env.production` 用来对项目进行配置。
<br />
<br />
### 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` 时校验。
<br />
<br />
<br />
Expand Down

0 comments on commit d103b4e

Please sign in to comment.