react-doctor 0.4.1 → 0.4.2-dev.1044e29
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/LICENSE +1 -1
- package/README.md +6 -74
- package/dist/cli.js +1532 -1378
- package/dist/index.d.ts +11 -1
- package/dist/index.js +69 -32
- package/dist/lsp.js +65 -33
- package/dist/skills/react-doctor/SKILL.md +2 -2
- package/dist/skills/{doctor-explain/SKILL.md → react-doctor/references/explain.md} +6 -9
- package/package.json +7 -7
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -37,85 +37,17 @@ npx react-doctor@latest install
|
|
|
37
37
|
|
|
38
38
|
Works with Claude Code, Cursor, Codex, OpenCode, and many more.
|
|
39
39
|
|
|
40
|
-
### 3.
|
|
40
|
+
### 3. Run in CI
|
|
41
41
|
|
|
42
|
-
React Doctor
|
|
42
|
+
React Doctor CI (GitHub Actions) reviews every pull request automatically and reports only the issues your change introduced, not your existing backlog.
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
react-doctor experimental-lsp --stdio
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
> The editor language server is experimental — its protocol, caching, and diagnostics may change between releases, hence the `experimental-` prefix.
|
|
49
|
-
|
|
50
|
-
Companion extensions for VS Code/Cursor and Zed live under `packages/`; any other LSP client can run the command above directly over stdio.
|
|
51
|
-
|
|
52
|
-
### 4. Run in CI (GitHub Actions) for your team
|
|
53
|
-
|
|
54
|
-
[](https://github.com/marketplace/actions/react-doctor)
|
|
44
|
+
[Add GitHub Action →](https://react.doctor/docs/ci-and-prs/github-actions-setup)
|
|
55
45
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
```yaml
|
|
59
|
-
name: React Doctor
|
|
60
|
-
|
|
61
|
-
on:
|
|
62
|
-
pull_request:
|
|
63
|
-
types: [opened, synchronize, reopened, ready_for_review]
|
|
64
|
-
|
|
65
|
-
permissions:
|
|
66
|
-
contents: read
|
|
67
|
-
pull-requests: write
|
|
68
|
-
issues: write
|
|
69
|
-
statuses: write # lets the action publish the score as a commit status
|
|
70
|
-
|
|
71
|
-
concurrency:
|
|
72
|
-
group: react-doctor-${{ github.event.pull_request.number || github.ref }}
|
|
73
|
-
cancel-in-progress: true
|
|
74
|
-
|
|
75
|
-
jobs:
|
|
76
|
-
react-doctor:
|
|
77
|
-
runs-on: ubuntu-latest
|
|
78
|
-
steps:
|
|
79
|
-
- uses: actions/checkout@v5
|
|
80
|
-
with:
|
|
81
|
-
fetch-depth: 0 # so React Doctor can diff against the merge-base for new-vs-existing
|
|
82
|
-
- uses: millionco/react-doctor@v2
|
|
83
|
-
```
|
|
46
|
+
### 4. Configure rules
|
|
84
47
|
|
|
85
|
-
|
|
48
|
+
You can configure which rules to run and how to run them in `doctor.config.ts`.
|
|
86
49
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
```yaml
|
|
90
|
-
- uses: millionco/react-doctor@75932719d11ef50e110eac01ce04acdc05fde074 # v2.0.1
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
[Add GitHub Action →](https://github.com/marketplace/actions/react-doctor)
|
|
94
|
-
|
|
95
|
-
### 4. Configure rules in `doctor.config.ts`
|
|
96
|
-
|
|
97
|
-
Configure with a `doctor.config.ts` (or `.js`, `.mjs`, `.cjs`, `.json`, `.jsonc`) in your project root.
|
|
98
|
-
|
|
99
|
-
```ts
|
|
100
|
-
// doctor.config.ts
|
|
101
|
-
import type { ReactDoctorConfig } from "react-doctor/api";
|
|
102
|
-
|
|
103
|
-
export default {
|
|
104
|
-
lint: true,
|
|
105
|
-
rules: {
|
|
106
|
-
"react-doctor/no-array-index-as-key": "off",
|
|
107
|
-
},
|
|
108
|
-
} satisfies ReactDoctorConfig;
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
Prefer JSON? Use `doctor.config.json`:
|
|
112
|
-
|
|
113
|
-
```jsonc
|
|
114
|
-
{
|
|
115
|
-
"$schema": "https://react.doctor/schema/config.json",
|
|
116
|
-
"lint": true,
|
|
117
|
-
}
|
|
118
|
-
```
|
|
50
|
+
[Learn more →](https://react.doctor/docs/configuration/config-files)
|
|
119
51
|
|
|
120
52
|
## Telemetry
|
|
121
53
|
|