react-doctor 0.2.13 → 0.2.14-dev.05d7bba
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 +37 -3
- package/dist/cli.js +16177 -5748
- package/dist/index.d.ts +119 -16
- package/dist/index.js +1294 -256
- package/dist/skills/doctor-explain/SKILL.md +75 -0
- package/dist/skills/react-doctor/SKILL.md +4 -0
- package/package.json +12 -5
- package/dist/cli-logger-CSZagq1E.js +0 -7564
- package/dist/rolldown-runtime-uZX_iqCz.js +0 -35
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<picture>
|
|
2
2
|
<source media="(prefers-color-scheme: dark)" srcset="./assets/react-doctor-readme-logo-dark.svg">
|
|
3
3
|
<source media="(prefers-color-scheme: light)" srcset="./assets/react-doctor-readme-logo-light.svg">
|
|
4
|
-
<img alt="React Doctor" src="./assets/react-doctor-readme-logo-light.svg" width="
|
|
4
|
+
<img alt="React Doctor" src="./assets/react-doctor-readme-logo-light.svg" width="134" height="36">
|
|
5
5
|
</picture>
|
|
6
6
|
|
|
7
7
|
[](https://npmjs.com/package/react-doctor)
|
|
@@ -67,10 +67,44 @@ jobs:
|
|
|
67
67
|
- uses: millionco/react-doctor@main
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
React Doctor scans the files changed in the pull request, emits inline annotations, blocks on error-level findings, and updates one sticky PR comment with the score and issue summary. The built-in GitHub token is used automatically; no secret or PAT is required. On forked PRs where GitHub withholds write permissions, the scan and annotations still run, but the sticky comment may be skipped.
|
|
71
|
-
|
|
72
70
|
[Add GitHub Action →](https://github.com/marketplace/actions/react-doctor)
|
|
73
71
|
|
|
72
|
+
### 4. Configure rules in `doctor.config.ts`
|
|
73
|
+
|
|
74
|
+
Configure with a `doctor.config.ts` (or `.js`, `.mjs`, `.cjs`, `.json`, `.jsonc`) in your project root.
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
// doctor.config.ts
|
|
78
|
+
import type { ReactDoctorConfig } from "react-doctor/api";
|
|
79
|
+
|
|
80
|
+
export default {
|
|
81
|
+
lint: true,
|
|
82
|
+
rules: {
|
|
83
|
+
"react-doctor/no-array-index-as-key": "off",
|
|
84
|
+
},
|
|
85
|
+
} satisfies ReactDoctorConfig;
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Prefer JSON? Use `doctor.config.json`:
|
|
89
|
+
|
|
90
|
+
```jsonc
|
|
91
|
+
{
|
|
92
|
+
"$schema": "https://react.doctor/schema/config.json",
|
|
93
|
+
"lint": true,
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Telemetry
|
|
98
|
+
|
|
99
|
+
The CLI reports crashes and basic run traces to [Sentry](https://sentry.io) to help us fix bugs. Events include the version, platform, Node version, how the CLI was invoked (which command, package manager, and whether it ran locally vs. CI vs. a coding agent), the detected project shape (framework, React version, TypeScript, project size — never the contents of your files), and de-minified stack traces.
|
|
100
|
+
|
|
101
|
+
Telemetry is **anonymized** before it leaves your machine: no IP address is collected, your hostname and machine name are stripped, your OS username is removed from every path (your home directory is replaced with `~`), captured local variables are dropped, and known secrets/API keys/emails are masked. No source code or diagnostic findings are sent.
|
|
102
|
+
|
|
103
|
+
Opt out at any time:
|
|
104
|
+
|
|
105
|
+
- `npx react-doctor@latest --no-telemetry` disables Sentry entirely (crash reporting and tracing) for that run, alongside the hosted score API.
|
|
106
|
+
- `SENTRY_TRACES_SAMPLE_RATE=0` keeps crash reporting but turns off performance tracing.
|
|
107
|
+
|
|
74
108
|
## Contributing
|
|
75
109
|
|
|
76
110
|
[Issues welcome!](https://github.com/millionco/react-doctor/issues)
|