Skip to content

Commit 5e98996

Browse files
authored
chore: migrate root tooling to Rstack CLI (#500)
1 parent 88fdf03 commit 5e98996

93 files changed

Lines changed: 1334 additions & 562 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: rstack-cli-docs
3+
description: Consult installed, version-matched Rstack docs only for user-facing `rs` command behavior, `rstack.config.*` semantics, or public `rstack` APIs. Do not use for purely internal implementation, tests, performance, or repository maintenance.
4+
---
5+
6+
# Rstack CLI docs
7+
8+
Rstack CLI is the `rstack` package, exposed through the `rs` binaries. It provides one CLI, one
9+
config file, and a consistent workflow for the Rstack JavaScript toolchain.
10+
11+
It covers web app, library, docs, test, lint, formatting, Git hook, and staged-file workflows.
12+
13+
## Read installed docs when this skill applies
14+
15+
When this skill applies, find and read the relevant Markdown documentation shipped with the installed `rstack` package.
16+
17+
Model knowledge can be outdated; the installed documentation is the source of truth for the project's Rstack version.
18+
19+
1. Start with `node_modules/rstack/docs/llms.txt`, then read only the linked pages relevant to the task before proposing or making changes.
20+
21+
2. For exact CLI flags and behavior, also run `rs -h` or `rs <command> -h` when supported.
22+
23+
If the bundled docs are not available at that path, locate the installed `rstack` package.
24+
25+
If they are still unavailable, verify that `rstack` is installed, and use CLI help plus the online [Rstack documentation](https://rstack.rs/) as a fallback.

.husky/pre-commit

Lines changed: 0 additions & 1 deletion
This file was deleted.

.prettierignore

Lines changed: 0 additions & 11 deletions
This file was deleted.

.prettierrc

Lines changed: 0 additions & 4 deletions
This file was deleted.

.rstack/hooks/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rs staged

.vscode/extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"recommendations": ["rstack.rslint", "esbenp.prettier-vscode"]
2+
"recommendations": ["rstack.rstack"]
33
}

.vscode/settings.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
"files.exclude": {
1414
"**/.DS_Store": true
1515
},
16-
"editor.defaultFormatter": "esbenp.prettier-vscode",
16+
"editor.defaultFormatter": "rstack.rstack",
1717
"mdx.validate.validateFileLinks": "ignore",
1818
"[javascript]": {
19-
"editor.defaultFormatter": "esbenp.prettier-vscode"
19+
"editor.defaultFormatter": "rstack.rstack"
2020
},
2121
"[typescript]": {
22-
"editor.defaultFormatter": "esbenp.prettier-vscode"
22+
"editor.defaultFormatter": "rstack.rstack"
2323
},
2424
"cSpell.words": ["rstest"]
2525
}

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Top-level directories:
7171

7272
## Coding Conventions
7373

74-
- Formatting and linting: `Rslint` and `Prettier` are used (see `rslint.config.ts` and `.prettierrc`).
74+
- Formatting, linting, staged-file tasks, and Git hooks use Rstack CLI (see `rstack.config.ts` and `.rstack/hooks/`).
7575
- Default JS/TS quote style is single quotes.
7676
- Line width is 100.
7777
- Prefer minimal, example-focused changes. This repo is a collection of runnable examples; avoid refactors that reduce clarity.

package.json

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "rstack-examples",
33
"version": "1.0.0",
4-
"type": "module",
54
"description": "Repository for examples of rstack",
65
"license": "MIT",
6+
"type": "module",
77
"scripts": {
88
"build": "pnpm run build:rspack && pnpm run build:rsbuild && pnpm run build:rspress && pnpm run build:rsdoctor && pnpm run build:rslib && pnpm run build:rstest",
99
"build:ci": "pnpm run build:rspack:ci && pnpm run build:rsbuild && pnpm run build:rspress && pnpm run build:rsdoctor && pnpm run build:rslib && pnpm run build:rstest",
@@ -15,30 +15,18 @@
1515
"build:rspress": "pnpm --filter \"./rspress/**\" --stream build",
1616
"build:rstest": "pnpm --filter \"./rstest/**\" --stream build",
1717
"bump": "taze -l",
18-
"lint": "rslint && prettier -c \"*.{json,jsonc,md,yml,yaml,ts}\" \".vscode/*.json\" \"{rspack,rsbuild,rspress,rsdoctor,rslib,rstest}/**/*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}\"",
19-
"lint:write": "rslint --fix && prettier -w \"*.{json,jsonc,md,yml,yaml,ts}\" \".vscode/*.json\" \"{rspack,rsbuild,rspress,rsdoctor,rslib,rstest}/**/*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}\"",
20-
"prepare": "husky",
21-
"sort-package-json": "npx sort-package-json \"rspack/*/package.json\" \"rsbuild/*/package.json\" \"rspress/*/package.json\" \"rsdoctor/*/package.json\" \"rslib/*/package.json\" \"rstest/*/package.json\"",
18+
"lint": "rs lint && rs fmt --check \"*.{json,jsonc,md,yml,yaml,ts}\" \".vscode/*.json\" \"{rspack,rsbuild,rspress,rsdoctor,rslib,rstest}/**/*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}\"",
19+
"lint:write": "rs lint --fix && rs fmt \"*.{json,jsonc,md,yml,yaml,ts}\" \".vscode/*.json\" \"{rspack,rsbuild,rspress,rsdoctor,rslib,rstest}/**/*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}\"",
20+
"prepare": "rs hooks",
21+
"sort-package-json": "rs fmt \"rspack/*/package.json\" \"rsbuild/*/package.json\" \"rspress/*/package.json\" \"rsdoctor/*/package.json\" \"rslib/*/package.json\" \"rstest/*/package.json\"",
2222
"test": "pnpm run test:rspack && pnpm run test:rstest",
2323
"test:rspack": "pnpm --filter \"./rspack/**\" --stream test",
2424
"test:rspack:eco-ci": "pnpm --filter \"./rspack/**\" --filter \"!./rspack/next-rspack-app-router\" --filter \"!./rspack/next-rspack-page-router\" --stream test",
2525
"test:rstest": "pnpm --filter \"./rstest/**\" --stream test"
2626
},
27-
"lint-staged": {
28-
"*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx}": [
29-
"rslint --fix",
30-
"prettier --write"
31-
],
32-
"*.{json,jsonc,md,mdx,yml,yaml,css,scss,less,html,vue}": [
33-
"prettier --write"
34-
]
35-
},
3627
"devDependencies": {
37-
"@rslint/core": "^0.5.3",
3828
"cross-env": "10.1.0",
39-
"husky": "9.1.7",
40-
"lint-staged": "16.4.0",
41-
"prettier": "^3.8.3",
29+
"rstack": "^0.7.2",
4230
"taze": "^19.14.1"
4331
},
4432
"packageManager": "pnpm@10.34.1"

0 commit comments

Comments
 (0)