Skip to content

Commit e359576

Browse files
committed
docs: simplify check command guidance
1 parent ea03a12 commit e359576

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

‎website/docs/en/guide/cli/check.mdx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ rs check src/index.ts packages/utils
2020

2121
## Checks
2222

23-
By default, `rs check` runs [`rs lint`](./lint) followed by [`rs fmt --check`](./fmt#--check) without modifying your files. It continues to check formatting even if linting or type checking reports errors, so you can see the results of all enabled checks in one run.
23+
By default, `rs check` runs [`rs lint`](./lint) followed by [`rs fmt --check`](./fmt#--check). It reports issues without modifying files.
2424

25-
The command exits successfully only when all enabled checks pass. Errors that prevent a check from running, such as a failure to load the configuration, may stop the command early.
25+
Formatting is still checked if linting or type checking reports errors. The command exits successfully only when all enabled checks pass.
2626

2727
## Options
2828

@@ -34,11 +34,11 @@ Automatically fix linting and formatting issues:
3434
rs check --fix
3535
```
3636

37-
This runs `rs lint --fix` to apply available lint fixes. If linting and any enabled type checking pass, it then runs `rs fmt --write` to format the updated files.
37+
This first runs `rs lint --fix` to apply available lint fixes. If linting and any enabled type checking pass, it then runs `rs fmt --write` to format the updated files.
3838

3939
### `--type-check`
4040

41-
By default, `rs check` checks only lint and formatting issues. Add `--type-check` to also check TypeScript types during linting:
41+
Add `--type-check` to enable TypeScript type checking alongside linting:
4242

4343
```bash
4444
rs check --type-check
@@ -54,4 +54,4 @@ rs check --help
5454

5555
## Configuration
5656

57-
`rs check` has no separate `define.check()` configuration. It uses the linting configuration from [`define.lint()`](../configuration#define-lint) and the formatting configuration from [`define.fmt()`](../configuration#define-fmt).
57+
`rs check` uses the linting configuration from [`define.lint()`](../configuration#define-lint) and the formatting configuration from [`define.fmt()`](../configuration#define-fmt).

‎website/docs/zh/guide/cli/check.mdx‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ description: '统一运行 lint 和格式检查,并可选启用 TypeScript 类
1212
rs check [options] [files...]
1313
```
1414

15-
传入文件或目录,可以将 lint 和格式检查都限制在这些路径中:
15+
传入文件或目录,可以只检查指定路径下的 lint 和格式问题:
1616

1717
```bash
1818
rs check src/index.ts packages/utils
1919
```
2020

2121
## 检查内容 \{#checks}
2222

23-
默认情况下,`rs check` 会先运行 [`rs lint`](./lint),再运行 [`rs fmt --check`](./fmt#--check),不会修改文件。即使 lint 或类型检查报告错误,也会继续检查格式,让你在一次运行中看到所有已启用检查的结果。
23+
默认情况下,`rs check` 会先运行 [`rs lint`](./lint),再运行 [`rs fmt --check`](./fmt#--check),仅报告问题,不修改文件。
2424

25-
只有所有已启用的检查都通过,命令才会成功退出。如果遇到配置加载失败等导致检查无法运行的错误,命令可能会提前停止。
25+
即使 lint 或类型检查报告错误,也会继续检查格式。只有所有已启用的检查都通过,命令才会成功退出。
2626

2727
## 选项 \{#options}
2828

@@ -34,11 +34,11 @@ rs check src/index.ts packages/utils
3434
rs check --fix
3535
```
3636

37-
该选项会先运行 `rs lint --fix`,应用可用的 lint 修复。只有 lint 和已启用的类型检查都通过,才会继续运行 `rs fmt --write`,格式化修复后的文件。
37+
该选项会先运行 `rs lint --fix`,自动修复 lint 问题。只有 lint 和已启用的类型检查都通过,才会继续运行 `rs fmt --write`,格式化修复后的文件。
3838

3939
### `--type-check`
4040

41-
默认情况下,`rs check` 只检查 lint 和格式问题。添加 `--type-check` 可在 lint 过程中同时检查 TypeScript 类型:
41+
添加 `--type-check`,可在 lint 过程中启用 TypeScript 类型检查:
4242

4343
```bash
4444
rs check --type-check
@@ -54,4 +54,4 @@ rs check --help
5454

5555
## 配置 \{#configuration}
5656

57-
`rs check` 没有独立的 `define.check()` 配置。它会使用 [`define.lint()`](../configuration#define-lint) 中的 lint 配置,以及 [`define.fmt()`](../configuration#define-fmt) 中的格式化配置。
57+
`rs check` 使用 [`define.lint()`](../configuration#define-lint) 中的 lint 配置,以及 [`define.fmt()`](../configuration#define-fmt) 中的格式化配置。

0 commit comments

Comments
 (0)