Skip to content

Commit 45229db

Browse files
authored
docs: prefer rs check in migration skill (#444)
1 parent ea862b3 commit 45229db

2 files changed

Lines changed: 19 additions & 3 deletions

File tree

.agents/skills/migrate-to-rstack-cli/SKILL.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,19 @@ Read every matching reference before editing. Load only the tools present in the
3434

3535
Rsbuild, Rslib, Rstest, Rslint, and Prettier remain transitive `rstack` dependencies. Remove obsolete direct dependencies and imports from the migrated scope; do not expect their names to disappear from the lockfile.
3636

37+
### Combined checks
38+
39+
After migrating lint and formatting commands, prefer the shorter combined command when behavior is equivalent:
40+
41+
| Separate commands | Preferred command |
42+
| ---------------------------------------- | ----------------------- |
43+
| `rs lint && rs fmt --check` | `rs check` |
44+
| `rs lint --type-check && rs fmt --check` | `rs check --type-check` |
45+
46+
`rs check` preserves the order and short-circuit behavior of these `&&` chains.
47+
48+
Combine only when both commands use the same working directory and Rstack config, with no positional inputs or command-specific options beyond those shown. Move a shared `-c` or `--config` to `rs check`. Keep the commands separate when their environment, wrappers, scope, execution order, concurrency, or output handling differs.
49+
3750
## Configuration
3851

3952
### Config files

.agents/skills/migrate-to-rstack-cli/references/rslint.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,20 @@ define.lint(({ globals }) => [
3939

4040
## Script pattern
4141

42-
If a script also runs Prettier, migrate its formatting command as described in [prettier.md](prettier.md).
42+
For example:
4343

4444
```json
4545
{
4646
"scripts": {
47-
"lint": "rs lint && rs fmt --check",
48-
"lint:write": "rs lint --fix && rs fmt"
47+
"check": "rs check",
48+
"format": "rs fmt",
49+
"lint": "rs lint"
4950
}
5051
}
5152
```
5253

54+
Preserve existing script names unless renaming is requested. For scripts that also run Prettier, follow [prettier.md](prettier.md), then apply the [combined-check rules](../SKILL.md#combined-checks).
55+
5356
## Validate
5457

5558
Run lint without writes. If Rstack upgrades Rslint, preserve the pre-migration lint baseline: disable newly enabled rules instead of changing source code, unless code changes are requested.

0 commit comments

Comments
 (0)