Skip to content

Commit b8f407c

Browse files
authored
Merge branch 'dev' into Fix-17854
2 parents c2de965 + a48474a commit b8f407c

File tree

2 files changed

+50
-6
lines changed

2 files changed

+50
-6
lines changed

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

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ Supporting system:
2929

3030
Run `./mvnw clean install -Prelease -Dmaven.test.skip=true`
3131

32-
### Code Style
32+
### Backend Code Style
3333

34-
DolphinScheduler uses `Spotless` for code style and formatting checks.
34+
DolphinScheduler uses `Spotless` for backend code style and formatting checks.
3535
You could run the following command and `Spotless` will automatically fix
36-
the code style and formatting errors for you:
36+
the backend code style and formatting errors for you:
3737

3838
```shell
3939
./mvnw spotless:apply
@@ -54,6 +54,28 @@ pre-commit install
5454

5555
Now, every time you commit your code, `pre-commit` will automatically run `Spotless` to check the code style and formatting.
5656

57+
### Frontend Code Style
58+
59+
DolphinScheduler uses `pnpm` to check and automatically fix frontend code style and formatting issues.
60+
First, navigate to the frontend project directory:
61+
62+
```shell
63+
cd dolphinscheduler-ui
64+
```
65+
66+
Then, run the following commands to automatically fix ESLint-fixable issues and format the code:
67+
68+
```shell
69+
pnpm run lint # Fix ESLint issues
70+
pnpm run prettier # Format code
71+
```
72+
73+
Finally, you can run the following command to perform a full TypeScript type check and catch type-related errors early:
74+
75+
```shell
76+
pnpm exec vue-tsc --noEmit # Type check
77+
```
78+
5779
### Helm Template Guidelines
5880

5981
After modifying files related to Helm templates, you can use the following command to debug the Helm templates:

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

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ git clone [email protected]:apache/dolphinscheduler.git
2828

2929
运行 `mvn clean install -Pstaging -Dmaven.test.skip=true`
3030

31-
### 代码风格
31+
### 后端代码风格
3232

33-
DolphinScheduler使用`Spotless`检查并修复代码风格和格式问题
34-
您可以执行如下的命令,`Spotless`将会为您自动检查并修复代码风格和格式问题
33+
DolphinScheduler使用`Spotless`检查并修复后端代码风格和格式问题
34+
您可以执行如下的命令,`Spotless`将会为您自动检查并修复后端代码风格和格式问题
3535

3636
```shell
3737
./mvnw spotless:apply
@@ -51,6 +51,28 @@ pre-commit install
5151

5252
现在,每次您提交代码时,`pre-commit`都会自动运行`Spotless`来检查代码风格和格式。
5353

54+
### 前端代码风格
55+
56+
DolphinScheduler使用`pnpm`检查并修复前端代码风格和格式问题。
57+
首先,进入前端项目文件夹:
58+
59+
```shell
60+
cd dolphinscheduler-ui
61+
```
62+
63+
然后,运行以下命令来自动修复 ESLint 可修复的问题,并格式化代码。
64+
65+
```shell
66+
pnpm run lint # 修复 ESLint 问题
67+
pnpm run prettier # 格式化代码
68+
```
69+
70+
最后,可以运行以下命令来执行完整的 TypeScript 类型检查,提前发现类型异常。
71+
72+
```shell
73+
pnpm exec vue-tsc --noEmit # 类型检查
74+
```
75+
5476
### Helm 模板规范
5577

5678
当您修改了Helm模板相关的文件后, 可以使用如下命令来调试 Helm 模板:

0 commit comments

Comments
 (0)