react-doctor 0.4.2-dev.25cc69b → 0.4.2-dev.6bfc03a
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
CHANGED
|
@@ -41,7 +41,7 @@ Works with Claude Code, Cursor, Codex, OpenCode, and many more.
|
|
|
41
41
|
|
|
42
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
|
-
[Add GitHub Action →](https://react.doctor/
|
|
44
|
+
[Add GitHub Action →](https://react.doctor/ci)
|
|
45
45
|
|
|
46
46
|
### 4. Configure rules
|
|
47
47
|
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="92822f58-92ef-58d5-8850-2746c0b48fc0")}catch(e){}}();
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
|
|
5
5
|
import * as path$1 from "node:path";
|
|
@@ -12248,7 +12248,7 @@ const makeNoopConsole = () => ({
|
|
|
12248
12248
|
});
|
|
12249
12249
|
//#endregion
|
|
12250
12250
|
//#region src/cli/utils/version.ts
|
|
12251
|
-
const VERSION = "0.4.2-dev.
|
|
12251
|
+
const VERSION = "0.4.2-dev.6bfc03a";
|
|
12252
12252
|
//#endregion
|
|
12253
12253
|
//#region src/cli/utils/json-mode.ts
|
|
12254
12254
|
let context = null;
|
|
@@ -12606,13 +12606,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
|
|
|
12606
12606
|
* uploads source-map artifacts under, so stack frames symbolicate. Honors the
|
|
12607
12607
|
* standard `SENTRY_RELEASE` override.
|
|
12608
12608
|
*/
|
|
12609
|
-
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.4.2-dev.
|
|
12609
|
+
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.4.2-dev.6bfc03a`;
|
|
12610
12610
|
/**
|
|
12611
12611
|
* Deployment environment shown in Sentry's environment filter. Defaults to
|
|
12612
12612
|
* `production` for tagged releases and `development` for dev/unbuilt versions,
|
|
12613
12613
|
* overridable via the standard `SENTRY_ENVIRONMENT` env var.
|
|
12614
12614
|
*/
|
|
12615
|
-
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.4.2-dev.
|
|
12615
|
+
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.4.2-dev.6bfc03a") ? "development" : "production");
|
|
12616
12616
|
/**
|
|
12617
12617
|
* Performance-tracing sample rate in `[0, 1]`. Reads `SENTRY_TRACES_SAMPLE_RATE`
|
|
12618
12618
|
* (set to `0` to disable tracing) and falls back to
|
|
@@ -19301,6 +19301,29 @@ const getSkillSourceDirectory = () => {
|
|
|
19301
19301
|
const distDirectory = path$1.dirname(fileURLToPath(import.meta.url));
|
|
19302
19302
|
return path$1.join(distDirectory, "skills", SKILL_NAME);
|
|
19303
19303
|
};
|
|
19304
|
+
const findBundledSiblingSkills = (primarySkillDir) => {
|
|
19305
|
+
const skillsParent = path$1.dirname(primarySkillDir);
|
|
19306
|
+
if (!fs$1.existsSync(skillsParent)) return [];
|
|
19307
|
+
const resolvedPrimary = path$1.resolve(primarySkillDir);
|
|
19308
|
+
return fs$1.readdirSync(skillsParent, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => ({
|
|
19309
|
+
name: entry.name,
|
|
19310
|
+
source: path$1.join(skillsParent, entry.name)
|
|
19311
|
+
})).filter((sibling) => path$1.resolve(sibling.source) !== resolvedPrimary && fs$1.existsSync(path$1.join(sibling.source, SKILL_MANIFEST_FILE)));
|
|
19312
|
+
};
|
|
19313
|
+
const installBundledSiblingSkills = async (primarySkillDir, agents, projectRoot) => {
|
|
19314
|
+
const installedSkillNames = [];
|
|
19315
|
+
for (const sibling of findBundledSiblingSkills(primarySkillDir)) {
|
|
19316
|
+
const result = await installSkillsFromSource({
|
|
19317
|
+
source: sibling.source,
|
|
19318
|
+
agents: [...agents],
|
|
19319
|
+
cwd: projectRoot,
|
|
19320
|
+
mode: "copy"
|
|
19321
|
+
});
|
|
19322
|
+
if (result.failed.length > 0) throw new Error(result.failed.map((failure) => `${getSkillAgentConfig(failure.agent).displayName}: ${failure.error}`).join("\n"));
|
|
19323
|
+
if (result.skills.length > 0) installedSkillNames.push(sibling.name);
|
|
19324
|
+
}
|
|
19325
|
+
return installedSkillNames;
|
|
19326
|
+
};
|
|
19304
19327
|
const canInstallNativeAgentHooks = (agents) => agents.some((agent) => agent === "claude-code" || agent === "cursor");
|
|
19305
19328
|
const installReactDoctorSkillStep = async (sourceDir, selectedAgents, projectRoot) => {
|
|
19306
19329
|
const installSpinner = spinner(`Installing ${SKILL_NAME} skill...`).start();
|
|
@@ -19318,6 +19341,12 @@ const installReactDoctorSkillStep = async (sourceDir, selectedAgents, projectRoo
|
|
|
19318
19341
|
installSpinner.fail(`Failed to install ${SKILL_NAME} skill.`);
|
|
19319
19342
|
throw error;
|
|
19320
19343
|
}
|
|
19344
|
+
try {
|
|
19345
|
+
const installedSiblingSkills = await installBundledSiblingSkills(sourceDir, selectedAgents, projectRoot);
|
|
19346
|
+
if (installedSiblingSkills.length > 0) cliLogger.dim(` Also installed the ${installedSiblingSkills.join(", ")} skill.`);
|
|
19347
|
+
} catch {
|
|
19348
|
+
cliLogger.dim(" Skipped bundled sibling skills (install error).");
|
|
19349
|
+
}
|
|
19321
19350
|
};
|
|
19322
19351
|
const installReactDoctorGitHookStep = (gitHookTarget) => {
|
|
19323
19352
|
const hookSpinner = spinner("Installing React Doctor pre-commit hook...").start();
|
|
@@ -19461,6 +19490,7 @@ const runInstallReactDoctor = async (options = {}) => {
|
|
|
19461
19490
|
cliLogger.log(`Dry run — would install ${SKILL_NAME} skill for:`);
|
|
19462
19491
|
for (const agent of selectedAgents) cliLogger.dim(` - ${getSkillAgentConfig(agent).displayName}`);
|
|
19463
19492
|
cliLogger.dim(` Source: ${sourceDir}`);
|
|
19493
|
+
for (const sibling of findBundledSiblingSkills(sourceDir)) cliLogger.dim(` Also installs skill: ${sibling.name}`);
|
|
19464
19494
|
cliLogger.dim(" Package script: doctor (or react-doctor if doctor exists)");
|
|
19465
19495
|
cliLogger.dim(" Dev dependency: react-doctor");
|
|
19466
19496
|
if (shouldInstallGitHook) cliLogger.dim(` Git hook: ${gitHookPath}`);
|
|
@@ -21592,4 +21622,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
|
|
|
21592
21622
|
export {};
|
|
21593
21623
|
|
|
21594
21624
|
//# sourceMappingURL=cli.js.map
|
|
21595
|
-
//# debugId=
|
|
21625
|
+
//# debugId=92822f58-92ef-58d5-8850-2746c0b48fc0
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
name: doctor-explain
|
|
3
|
+
description: Explain React Doctor rules and configure which ones run via doctor.config.* (or package.json#reactDoctor). Use when the user types `/doctor-explain` or `/doctor-config`, asks why a rule fired, disagrees with a rule, wants to disable/enable a rule, silence a category or tag, tune CI/PR noise, or asks "what does this rule mean". Covers the `react-doctor rules` CLI (list, explain, set, enable, disable, category, ignore-tag) and how config layers combine: ignore.tags disables matching rules before linting, rules over categories sets severity, surfaces controls visibility only.
|
|
4
|
+
version: "1.0.0"
|
|
5
|
+
---
|
|
2
6
|
|
|
3
|
-
|
|
4
|
-
wants to understand a rule or change which rules run — not for fixing diagnostics
|
|
5
|
-
(that is the main `react-doctor` skill / `/doctor`).
|
|
7
|
+
# Doctor Explain
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
Explains React Doctor rules and edits `doctor.config.*` safely. Use this when a user wants to understand a rule or change which rules run — not for fixing diagnostics (that is the `react-doctor` skill / `/doctor`).
|
|
10
|
+
|
|
11
|
+
Triggers: `/doctor-explain`, `/doctor-config`, "why did this rule fire", "I disagree with this rule", "turn this rule off", "stop flagging X", "too noisy", "disable design rules".
|
|
9
12
|
|
|
10
13
|
## Workflow
|
|
11
14
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: react-doctor
|
|
3
3
|
description: Use when finishing a feature, fixing a bug, before committing React code, or when the user types `/doctor`, asks to scan, triage, or clean up React diagnostics. Covers lint, accessibility, bundle size, architecture. Includes a regression check and a full local-triage workflow that fetches the canonical playbook.
|
|
4
|
-
version: "1.
|
|
4
|
+
version: "1.1.0"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# React Doctor
|
|
@@ -34,7 +34,7 @@ Pair it with the matching per-rule prompts at `https://www.react.doctor/prompts/
|
|
|
34
34
|
|
|
35
35
|
## Configuring or explaining rules
|
|
36
36
|
|
|
37
|
-
When the user wants to understand a rule, disagrees with one, or wants to disable / tune which rules run (not fix code),
|
|
37
|
+
When the user wants to understand a rule, disagrees with one, or wants to disable / tune which rules run (not fix code), use the `doctor-explain` skill (alias `/doctor-config`). Start with `npx react-doctor@latest rules explain <rule>`, then apply the narrowest control via `npx react-doctor@latest rules disable|set|category|ignore-tag …`, which edits your `doctor.config.*` (or `package.json#reactDoctor`).
|
|
38
38
|
|
|
39
39
|
## Command
|
|
40
40
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-doctor",
|
|
3
|
-
"version": "0.4.2-dev.
|
|
3
|
+
"version": "0.4.2-dev.6bfc03a",
|
|
4
4
|
"description": "Your agent writes bad React. This catches it",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"accessibility",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"vscode-languageserver": "^9.0.1",
|
|
67
67
|
"vscode-languageserver-textdocument": "^1.0.12",
|
|
68
68
|
"vscode-uri": "^3.1.0",
|
|
69
|
-
"oxlint-plugin-react-doctor": "0.4.2-dev.
|
|
69
|
+
"oxlint-plugin-react-doctor": "0.4.2-dev.6bfc03a"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@types/babel__code-frame": "^7.27.0",
|