@cubocicloide/stack-react-fastapi 13.3.0 → 13.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cubocicloide/stack-react-fastapi",
3
- "version": "13.3.0",
3
+ "version": "13.4.0",
4
4
  "description": "React (Vite) + FastAPI stack plugin for the dude CLI.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -20,7 +20,7 @@
20
20
  "openapi-typescript": "^7.13.0",
21
21
  "pathe": "^1.1.2",
22
22
  "yaml": "^2.6.0",
23
- "@cubocicloide/dude": "0.16.0"
23
+ "@cubocicloide/dude": "0.17.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/node": "^26.1.2",
@@ -29,7 +29,7 @@
29
29
  "vitest": "^2.1.9"
30
30
  },
31
31
  "engines": {
32
- "node": ">=20"
32
+ "node": ">=20.19"
33
33
  },
34
34
  "scripts": {
35
35
  "build": "tsup",
@@ -138,16 +138,16 @@ Run on the consolidated branch (or the single agent branch):
138
138
  dude lint
139
139
  ```
140
140
 
141
- If the project has a test command (check `Makefile`, `package.json` scripts, or
142
- `dude help`), run it next:
141
+ Run the project's own test suite next:
143
142
 
144
143
  ```bash
145
- dude test # if available
146
- # or:
147
- cd backend && python -m pytest
148
- cd frontend && pnpm test
144
+ dude test
149
145
  ```
150
146
 
147
+ `dude help test` lists the suites this project actually exposes (`--backend`,
148
+ `--e2e`, …) — they differ per stack. If the change is scoped to one suite, run
149
+ that one rather than the lot.
150
+
151
151
  If any step fails, report the output and stop — do **not** create a PR.
152
152
 
153
153
  ---
@@ -0,0 +1,34 @@
1
+ # PRJ001 — Example project rule
2
+
3
+ This file is the prose half of the example project check
4
+ (`.dude/lint/checks/PRJ/001.ts`). Rename, edit or delete both together.
5
+
6
+ ## What it does
7
+
8
+ Nothing yet — the shipped check returns no diagnostics. It exists so you have a
9
+ working pair to copy: a rule module, and the Markdown that explains it.
10
+
11
+ ## Why the file is here
12
+
13
+ `dude explain PRJ001` prints **this file**, and `dude cheatsheet` uses its first
14
+ heading as the rule's one-line title. A project rule with no Markdown beside it
15
+ still runs, but it can only ever be listed as a bare code — which tells whoever
16
+ hits the diagnostic (a teammate, or a coding agent) nothing about how to fix it.
17
+
18
+ The convention is a sibling file, matching the check's path:
19
+
20
+ ```
21
+ .dude/lint/checks/PRJ/001.ts ← the rule
22
+ .dude/lint/checks/PRJ/001.md ← this file
23
+ ```
24
+
25
+ `dude lint` ignores non-module files, so the Markdown never runs as a check.
26
+
27
+ > Stack rules follow the mirror-image convention — their prose lives under
28
+ > `.claude/rules/<GROUP>/<NNN>.md`. Both are served by `dude explain <CODE>`.
29
+
30
+ ## How to fix a violation
31
+
32
+ Describe the fix here, concretely enough that someone can act on it without
33
+ opening the check's source. Start the file with `# <CODE> — <title>` so the
34
+ title is picked up.
@@ -38,9 +38,26 @@ export default function check(root: string): RawDiagnostic[] {
38
38
  Checks are loaded with [jiti](https://github.com/unjs/jiti), so you can write
39
39
  real TypeScript and `import` any package you add to the project.
40
40
 
41
- You can document a rule with a Markdown file next to it
42
- (`PRJ/001.md`) — `dude lint` ignores non-module files. Co-located tests
43
- (`001.test.ts`) are ignored too.
41
+ ## Documenting a rule
42
+
43
+ Put a Markdown file next to the check, named after it:
44
+
45
+ ```
46
+ .dude/lint/checks/PRJ/001.ts ← the rule
47
+ .dude/lint/checks/PRJ/001.md ← what it means and how to fix it
48
+ ```
49
+
50
+ `dude explain PRJ001` prints that file, and `dude cheatsheet` uses its first
51
+ heading (`# PRJ001 — <title>`) as the rule's one-line title. Without it the rule
52
+ still runs, but it can only be reported as a bare code — which tells whoever hits
53
+ the diagnostic nothing about how to fix it. The shipped `PRJ/001.md` is a worked
54
+ example.
55
+
56
+ `dude lint` ignores non-module files, so the Markdown never runs as a check.
57
+ Co-located tests (`001.test.ts`) are ignored too.
58
+
59
+ > Stack rules use the mirror-image location, `.claude/rules/<GROUP>/<NNN>.md`.
60
+ > `dude explain <CODE>` serves both.
44
61
 
45
62
  ## Choosing codes
46
63
 
@@ -97,6 +97,7 @@ defines every service.
97
97
  | Command | Description |
98
98
  |---------|-------------|
99
99
  | `dude lint` | Run all structural lint checks (naming, layout conventions) |
100
+ | `dude explain <CODE>` | Print the prose behind a lint code — why the rule exists and how to fix it |
100
101
  | `dude format` | Format code — `ruff` (backend) + `prettier` (frontend) |
101
102
  | `dude upgrade` | Update the pinned `dude` CLI and stack versions for this project |
102
103
  | `dude review` | Run lint + ESLint + API contract review in one pass |
@@ -106,13 +107,29 @@ defines every service.
106
107
  `dude lint` also runs any rules you define under `.dude/lint/checks/` — the
107
108
  rule code is derived from the path (`.dude/lint/checks/PRJ/001.ts` → `PRJ001`)
108
109
  and the contract is the same one the stack's own checks use. See
109
- `.dude/lint/checks/README.md` and the `PRJ/001.ts` example. To disable a
110
- built-in rule, list its code in `dude.json`:
110
+ `.dude/lint/checks/README.md` and the `PRJ/001.ts` example. Document a rule with
111
+ a Markdown file next to it (`PRJ/001.md`) and `dude explain PRJ001` serves it.
112
+ To disable a built-in rule, list its code in `dude.json`:
111
113
 
112
114
  ```json
113
115
  { "lint": { "disable": ["BE003"] } }
114
116
  ```
115
117
 
118
+ ### Verifying your work mechanically
119
+
120
+ `dude lint` and `dude explain` are designed to be used together — the fastest
121
+ loop for anyone, human or coding agent, working in this project:
122
+
123
+ ```bash
124
+ dude lint --format json # what broke, where, and under which rule code
125
+ dude explain BE003 # why that rule exists and how to satisfy it
126
+ ```
127
+
128
+ `--format json` writes nothing but the JSON document to stdout, so it pipes
129
+ cleanly (`dude lint --format json | jq '.diagnostics[].code'`). Exit codes are
130
+ the same as the human format: non-zero only when there is at least one error.
131
+ Run `dude explain` with no code to list every rule that applies here.
132
+
116
133
  ### Upgrading pinned versions
117
134
 
118
135
  `dude upgrade` updates version pins only. It does **not** migrate existing