react-doctor 0.0.35 → 0.0.37
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/README.md +5 -3
- package/dist/cli.js +320 -153
- package/dist/cli.js.map +1 -1
- package/dist/index.js +45 -0
- package/dist/index.js.map +1 -1
- package/dist/react-doctor-plugin.d.ts.map +1 -1
- package/dist/react-doctor-plugin.js +549 -1
- package/dist/react-doctor-plugin.js.map +1 -1
- package/dist/skills/react-doctor/SKILL.md +32 -0
- package/package.json +1 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: react-doctor
|
|
3
|
+
description: Use when finishing a feature, fixing a bug, before committing React code, or when the user wants to improve code quality or clean up a codebase. Checks for score regression. Covers lint, dead code, accessibility, bundle size, architecture diagnostics.
|
|
4
|
+
version: "1.0.0"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# React Doctor
|
|
8
|
+
|
|
9
|
+
Scans React codebases for security, performance, correctness, and architecture issues. Outputs a 0–100 health score.
|
|
10
|
+
|
|
11
|
+
## After making React code changes:
|
|
12
|
+
|
|
13
|
+
Run `npx -y react-doctor@latest . --verbose --diff` and check the score did not regress.
|
|
14
|
+
|
|
15
|
+
If the score dropped, fix the regressions before committing.
|
|
16
|
+
|
|
17
|
+
## For general cleanup or code improvement:
|
|
18
|
+
|
|
19
|
+
Run `npx -y react-doctor@latest . --verbose` (without `--diff`) to scan the full codebase. Fix issues by severity — errors first, then warnings.
|
|
20
|
+
|
|
21
|
+
## Command
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx -y react-doctor@latest . --verbose --diff
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
| Flag | Purpose |
|
|
28
|
+
| ----------- | --------------------------------------------- |
|
|
29
|
+
| `.` | Scan current directory |
|
|
30
|
+
| `--verbose` | Show affected files and line numbers per rule |
|
|
31
|
+
| `--diff` | Only scan changed files vs base branch |
|
|
32
|
+
| `--score` | Output only the numeric score |
|