You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .agents/skills/migrate-to-rstack-cli/SKILL.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,11 @@ Read every matching reference before editing. Load only the tools present in the
34
34
35
35
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.
36
36
37
-
## Configuration Rules
37
+
## Configuration
38
+
39
+
### Config Files
40
+
41
+
Treat each workspace or config root independently. A monorepo may need multiple Rstack config files when commands run from different package directories; validate config discovery from each directory.
38
42
39
43
Use one of the default names: `rstack.config.ts`, `.js`, `.mts`, or `.mjs`.
40
44
@@ -53,6 +57,8 @@ define.test({
53
57
});
54
58
```
55
59
60
+
### Modules and Imports
61
+
56
62
Use dynamic imports in async config functions only for external plugins, presets, and other dependencies:
Copy file name to clipboardExpand all lines: .agents/skills/migrate-to-rstack-cli/references/rslint.md
+17-3Lines changed: 17 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,10 @@ Read this reference when the project uses `@rslint/core`, `rslint.config.*`, `rs
6
6
7
7
1. Replace the `rslint` executable prefix with `rs lint`. For example, replace `rslint --fix` with `rs lint --fix`.
8
8
2. Move the old config into `define.lint`, replacing Rslint's `defineConfig()` wrapper and import. Receive `@rslint/core` exports from the factory parameter.
9
-
3. Replace custom `--config` paths with the migrated `rstack.config.*` path.
10
-
4. Remove `@rslint/core` only when no uncovered direct runtime API remains. Delete `rslint.config.*`.
11
-
5. If tracked VS Code configuration recommends `rstack.rslint`, replace it with the unified `rstack.rstack` extension. Move relevant `rslint.*` settings to their current `rstack.rslint.*` equivalents according to the [Rstack extension documentation](https://github.com/rstackjs/rstack-editor/blob/main/packages/vscode/README.md). Keep `source.fixAll.rslint` unchanged.
9
+
3. If the old config imports the `globals` package for environment maps such as `globals.browser`, receive `globals` from the factory parameter instead. Remove the direct `globals` dependency after confirming that no other file uses it.
10
+
4. Replace custom `--config` paths with the migrated `rstack.config.*` path.
11
+
5. Remove `@rslint/core` only when no uncovered direct runtime API remains. Delete `rslint.config.*`.
12
+
6. If tracked VS Code configuration recommends `rstack.rslint`, replace it with the unified `rstack.rstack` extension. Move relevant `rslint.*` settings to their current `rstack.rslint.*` equivalents according to the [Rstack extension documentation](https://github.com/rstackjs/rstack-editor/blob/main/packages/vscode/README.md). Keep `source.fixAll.rslint` unchanged.
12
13
13
14
## Config Pattern
14
15
@@ -23,6 +24,19 @@ define.lint(({ js, ts }) => [
23
24
24
25
Preserve existing presets and rules during migration.
25
26
27
+
The factory also provides Rslint's built-in globals catalog, so an external `globals` import is unnecessary:
28
+
29
+
```ts
30
+
define.lint(({ globals }) => [
31
+
{
32
+
files: ['**/*.{js,cjs,mjs}'],
33
+
languageOptions: {
34
+
globals: globals.browser,
35
+
},
36
+
},
37
+
]);
38
+
```
39
+
26
40
## Script Pattern
27
41
28
42
If a script also runs Prettier, migrate its formatting command as described in [prettier.md](prettier.md).
0 commit comments