Skip to content

Commit 9850889

Browse files
苏义超ruanwenjun
authored andcommitted
add frontend type check
1 parent f5ea5f1 commit 9850889

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

docs/docs/en/contribute/development-environment-setup.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,17 @@ First, navigate to the frontend project directory:
6363
cd dolphinscheduler-ui
6464
```
6565

66-
Then, run `pnpm run lint` to check and fix frontend code style and formatting issues:
66+
Then, run the following commands to automatically fix ESLint-fixable issues and format the code:
6767

6868
```shell
69-
pnpm run lint
69+
pnpm run lint # Fix ESLint issues
70+
pnpm run prettier # Format code
7071
```
7172

72-
Finally, you can run `pnpm run build:prod` to perform a full TypeScript type check, ensuring that only type-safe code is committed.
73+
Finally, you can run the following command to perform a full TypeScript type check and catch type-related errors early:
7374

7475
```shell
75-
pnpm run build:prod
76+
pnpm exec vue-tsc --noEmit # Type check
7677
```
7778

7879
### Helm Template Guidelines

docs/docs/zh/contribute/development-environment-setup.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,17 @@ DolphinScheduler使用`pnpm`检查并修复前端代码风格和格式问题。
6060
cd dolphinscheduler-ui
6161
```
6262

63-
然后,使用`pnpm run lint`检查并修复前端代码风格和格式问题
63+
然后,运行以下命令来自动修复 ESLint 可修复的问题,并格式化代码
6464

6565
```shell
66-
pnpm run lint
66+
pnpm run lint # 修复 ESLint 问题
67+
pnpm run prettier # 格式化代码
6768
```
6869

69-
最后,可以运行`pnpm run build:prod`来执行完整的 TypeScript 类型检查,确保只有类型正确的代码才能被提交
70+
最后,可以运行以下命令来执行完整的 TypeScript 类型检查,提前发现类型异常
7071

7172
```shell
72-
pnpm run build:prod
73+
pnpm exec vue-tsc --noEmit # 类型检查
7374
```
7475

7576
### Helm 模板规范

0 commit comments

Comments
 (0)