react-doctor 0.9.17-dev.6932e7d → 0.9.17-dev.695e46e
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 +16 -68
- package/dist/{build-section-divider-CCkdYDGY.js → build-section-divider-BlNg8CJ3.js} +4 -4
- package/dist/{ci-CLau9lJp.js → ci-dPYHQlYK.js} +18 -12
- package/dist/cli.js +27 -27
- package/dist/{design-tLYKOrgj.js → design-CEbK8378.js} +4 -4
- package/dist/duplicate-jsx-worker.js +3 -3
- package/dist/{exit-gracefully-CJYxagiG.js → exit-gracefully-C8JRlcU-.js} +6 -6
- package/dist/{handle-error-CXKa5V_C.js → handle-error-qi-5p5I2.js} +5 -5
- package/dist/index.d.ts +12 -5
- package/dist/index.js +32 -25
- package/dist/{inspect-kY0lepPl.js → inspect-BJE38z7r.js} +24 -19
- package/dist/{install-CcgxmHS7.js → install-R-4Yhbnt.js} +9 -9
- package/dist/{install-doctor-script-BYia3c6r.js → install-doctor-script-CzA3N60N.js} +4 -4
- package/dist/{install-github-workflow-DT9g71vu.js → install-github-workflow-DqIx2JgD.js} +5 -5
- package/dist/{install-react-doctor-gIlaQo52.js → install-react-doctor-BzFeAPsN.js} +8 -8
- package/dist/{jsx-runtime-Dz1BgjFv.js → jsx-runtime-BkWtbZXO.js} +5 -5
- package/dist/{print-branded-header-DcuhNpZD.js → print-branded-header-CO4r1oDZ.js} +4 -4
- package/dist/{prompt-runtime-scan-url-CU7G3L34.js → prompt-runtime-scan-url-sBG2_LDZ.js} +5 -5
- package/dist/{read-object-file-vLexPMRt.js → read-object-file-Bl7a4v-9.js} +4 -4
- package/dist/{record-metric-BzJGgUyE.js → record-metric-DcSvz1k4.js} +129 -53
- package/dist/{report-error-yT3d2npg.js → report-error-BmvMTKij.js} +5 -5
- package/dist/{report-workflow-result-Ch1KGhmX.js → report-workflow-result-K7NFRSY6.js} +5 -5
- package/dist/{resolve-scan-exit-code-7pqpigjA.js → resolve-scan-exit-code-KDrMkTrJ.js} +24 -32
- package/dist/{resolve-scope-C9r6_i2P.js → resolve-scope-DIgYBn32.js} +10 -9
- package/dist/{rules-53y-4mhG.js → rules-H0yqeV5v.js} +6 -6
- package/dist/{run-scan-app-xQcO9Chd.js → run-scan-app-ChPI8NEg.js} +16 -14
- package/dist/{runtime-scan-Dna29iOk.js → runtime-scan-XUqvrTH4.js} +9 -9
- package/dist/{sanitize-runtime-url-BAn4mEFw.js → sanitize-runtime-url-D_7VZU0F.js} +4 -4
- package/dist/{scan-Dcsq2-gA.js → scan-BTohT6wy.js} +9 -9
- package/dist/{should-skip-prompts-gmTKMHB5.js → should-skip-prompts-BX-idWyW.js} +4 -4
- package/dist/{should-use-tui-C8mCTPBf.js → should-use-tui-CnsREuvI.js} +4 -4
- package/dist/skills/react-doctor/SKILL.md +9 -8
- package/dist/skills/react-doctor/references/explain.md +5 -0
- package/dist/{telemetry-runtime-DUAbnIzM.js → telemetry-runtime-BufSIW3d.js} +6 -6
- package/dist/{version-Bk87XkeX.js → version-BVBbh_L8.js} +4 -4
- package/dist/{why-Cv45HYJ4.js → why-BJoyzEcf.js} +4 -4
- package/dist/{with-run-span-CmzJ3vFq.js → with-run-span-xUMrAJ_a.js} +5 -5
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -7,80 +7,53 @@
|
|
|
7
7
|
[](https://npmjs.com/package/react-doctor)
|
|
8
8
|
[](https://npmjs.com/package/react-doctor)
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
React Doctor runs deterministic checks on your code. It reports issues in state and effects, performance, architecture, security, accessibility, and maintainability.
|
|
11
11
|
|
|
12
|
-
React
|
|
12
|
+
Supports React projects built with Next.js, Vite, Astro, TanStack, React Native, and Expo.
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
[Website →](https://react.doctor/docs)
|
|
14
|
+
[Documentation →](https://react.doctor/docs)
|
|
17
15
|
|
|
18
16
|
## Install
|
|
19
17
|
|
|
20
|
-
### 1.
|
|
18
|
+
### 1. Run a scan
|
|
21
19
|
|
|
22
|
-
Run this
|
|
20
|
+
Run this command from your project root:
|
|
23
21
|
|
|
24
22
|
```bash
|
|
25
23
|
npx react-doctor@latest
|
|
26
24
|
```
|
|
27
25
|
|
|
28
|
-
Pass file paths to scan only the files that another CI step selected.
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
npx react-doctor@latest src/a.tsx src/b.tsx
|
|
32
|
-
```
|
|
33
|
-
|
|
34
26
|
https://github.com/user-attachments/assets/07cc88d9-9589-44c3-aa73-5d603cb1c570
|
|
35
27
|
|
|
36
28
|
### 2. Install for agents
|
|
37
29
|
|
|
38
|
-
|
|
30
|
+
Install the skill to help your coding agent find and fix React issues:
|
|
39
31
|
|
|
40
32
|
```bash
|
|
41
33
|
npx react-doctor@latest install
|
|
42
34
|
```
|
|
43
35
|
|
|
44
|
-
|
|
36
|
+
Supports coding agents including Claude Code, Cursor, Codex, and OpenCode.
|
|
45
37
|
|
|
46
38
|
### 3. Run in CI
|
|
47
39
|
|
|
48
|
-
|
|
40
|
+
Scan each pull request and report the issues it introduces:
|
|
49
41
|
|
|
50
42
|
```bash
|
|
51
43
|
npx react-doctor@latest ci install
|
|
52
44
|
```
|
|
53
45
|
|
|
54
|
-
This adds a workflow that scans each pull request and posts a summary comment.
|
|
55
|
-
|
|
56
|
-
Set `comment-on-clean: false` in the Action inputs to create comments only when the scan finds issues. Existing comments still update after a clean scan.
|
|
57
|
-
|
|
58
|
-
With the default `version: latest`, the Action uses an installed `react-doctor` dependency when available. Set another `version` value to override the installed version. Install your project dependencies before the Action to use this path.
|
|
59
|
-
|
|
60
|
-
For a GitLab warning status without blocking a merge, use a separate warning exit code:
|
|
61
|
-
|
|
62
|
-
```yaml
|
|
63
|
-
react-doctor:
|
|
64
|
-
script:
|
|
65
|
-
- npx react-doctor@latest . --warning-exit-code 123
|
|
66
|
-
allow_failure:
|
|
67
|
-
exit_codes: 123
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
With the default `--blocking error`, errors and hard lint failures exit with `1`. Warnings exit with `123`. Clean scans exit with `0`. The warning code must be an integer from `2` to `255`. Without this option, warnings still exit with `0`.
|
|
71
|
-
|
|
72
|
-
`--blocking warning` takes priority and exits with `1` for warnings. `--blocking none` disables the warning exit code. Score-only mode and degraded baseline comparisons also skip the warning exit code. The existing warning filters and `ciFailure` surface settings still apply.
|
|
73
|
-
|
|
74
46
|
[CI docs →](https://react.doctor/ci)
|
|
75
47
|
|
|
76
48
|
### 4. Configure rules
|
|
77
49
|
|
|
78
|
-
|
|
50
|
+
Choose rules and scan settings in `doctor.config.ts`.
|
|
79
51
|
|
|
80
|
-
|
|
81
|
-
|
|
52
|
+
With `customRulesOnly: true`, explicit `rules` settings of `"warn"` or `"error"`
|
|
53
|
+
enable selected ported rules. Legacy rule names also work. Other ported rules and
|
|
54
|
+
the React Compiler plugin stay off.
|
|
82
55
|
|
|
83
|
-
[
|
|
56
|
+
[Configuration docs →](https://react.doctor/docs/configuration/config-files)
|
|
84
57
|
|
|
85
58
|
## Runtime performance traces
|
|
86
59
|
|
|
@@ -90,41 +63,16 @@ Record a Chrome DevTools performance trace while you interact with a running Rea
|
|
|
90
63
|
npx react-doctor@latest scan http://localhost:3000
|
|
91
64
|
```
|
|
92
65
|
|
|
93
|
-
|
|
94
|
-
(up to five minutes), and flashes purple outlines with component names as React renders. It then
|
|
95
|
-
returns a readable summary plus the path to a compressed DevTools trace. Use `--format json` or
|
|
96
|
-
`--format jsonl` for coding agents. In an interactive terminal, you can run `react-doctor scan`
|
|
97
|
-
without a URL and choose a detected localhost app or enter another URL; coding agents and CI must
|
|
98
|
-
pass the URL explicitly.
|
|
99
|
-
|
|
100
|
-
An already-open normal browser is left alone. To reuse an authenticated session, start a dedicated
|
|
101
|
-
Chrome profile with remote debugging, sign in, close its non-blank tabs, and pass its endpoint:
|
|
102
|
-
|
|
103
|
-
```bash
|
|
104
|
-
npx react-doctor@latest scan https://app.example.com --cdp http://127.0.0.1:9222
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
Chrome performance tracing is browser-wide, so React Doctor rejects attached profiles with open
|
|
108
|
-
pages. It closes blank startup tabs before tracing and closes its scan tab afterward; the attached
|
|
109
|
-
browser stays open. The trace is stored locally and is never uploaded, but it can contain page
|
|
110
|
-
URLs, source paths, and React profiling details. Treat it as sensitive application data.
|
|
66
|
+
[Runtime trace docs →](https://react.doctor/docs/reference/cli-reference#runtime-performance-traces)
|
|
111
67
|
|
|
112
68
|
## Telemetry
|
|
113
69
|
|
|
114
|
-
The CLI
|
|
115
|
-
|
|
116
|
-
We collect:
|
|
117
|
-
|
|
118
|
-
- Environment: CLI version, platform, Node version
|
|
119
|
-
- Invocation: which command, package manager, and run context (whether it's local vs. CI vs. coding agent)
|
|
120
|
-
- Project shape: framework, React version, TypeScript, project size (NO file contents)
|
|
121
|
-
- Rules fired: rule names and counts only (e.g. `react-doctor/no-array-index-as-key`) (NO code or specific findings)
|
|
122
|
-
- De-minified React Doctor CLI stack traces
|
|
70
|
+
The CLI collects crash reports and anonymous usage data. See [Data use](https://react.doctor/docs/legal/data-use) for details.
|
|
123
71
|
|
|
124
72
|
To opt out, run: `npx react-doctor@latest --no-telemetry`
|
|
125
73
|
|
|
126
74
|
## Contributing
|
|
127
75
|
|
|
128
|
-
[
|
|
76
|
+
[Report an issue](https://github.com/millionco/react-doctor/issues)
|
|
129
77
|
|
|
130
78
|
MIT-licensed
|
|
@@ -1,7 +1,7 @@
|
|
|
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]="d2077752-138e-5bf9-829a-d3ba7d642cf9")}catch(e){}}();
|
|
3
3
|
import { bt as DOCS_URL, lt as CANONICAL_GITHUB_URL } from "./constants-Bwylqy0B.js";
|
|
4
|
-
import {
|
|
4
|
+
import { Mt as highlighter } from "./record-metric-DcSvz1k4.js";
|
|
5
5
|
//#region src/cli/utils/resolve-measure-width.ts
|
|
6
6
|
const resolveClampedWidth = (input) => {
|
|
7
7
|
const terminalColumns = process.stdout.columns;
|
|
@@ -77,5 +77,5 @@ const buildSectionDivider = () => highlighter.dim(`${DIVIDER_INDENT}${"─".repe
|
|
|
77
77
|
//#endregion
|
|
78
78
|
export { buildFooterLinkLines as n, buildSectionDivider as t };
|
|
79
79
|
|
|
80
|
-
//# sourceMappingURL=build-section-divider-
|
|
81
|
-
//# debugId=
|
|
80
|
+
//# sourceMappingURL=build-section-divider-BlNg8CJ3.js.map
|
|
81
|
+
//# debugId=d2077752-138e-5bf9-829a-d3ba7d642cf9
|
|
@@ -1,16 +1,16 @@
|
|
|
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]="5821ba0c-3095-530c-a898-f88bdfaaf275")}catch(e){}}();
|
|
3
3
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
|
|
4
4
|
import { kt as GITHUB_ACTIONS_SETUP_URL, u as METRIC, ut as CI_URL } from "./constants-Bwylqy0B.js";
|
|
5
|
-
import {
|
|
6
|
-
import { o as isExpectedUserError } from "./telemetry-runtime-
|
|
7
|
-
import { n as handleUserError, t as handleError } from "./handle-error-
|
|
8
|
-
import { t as reportErrorToSentry } from "./report-error-
|
|
9
|
-
import { N as cliLogger, c as spinner, n as findNearestPackageDirectory } from "./install-doctor-script-
|
|
10
|
-
import { a as readReactDoctorWorkflow, d as detectDefaultBranch, f as runCommand, l as prompts, n as getReactDoctorWorkflowPath, s as upgradeWorkflowActionToV2, t as buildWorkflowContent } from "./install-github-workflow-
|
|
11
|
-
import { a as isValidBlockingLevel, c as openWorkflowPullRequest, l as stageWorkflowFile, n as isScopeValue } from "./resolve-scope-
|
|
12
|
-
import { t as shouldSkipPrompts } from "./should-skip-prompts-
|
|
13
|
-
import { t as printBrandedHeader } from "./print-branded-header-
|
|
5
|
+
import { Mt as highlighter, Tn as runSync, _t as findGitRepositoryRoot, t as recordCount } from "./record-metric-DcSvz1k4.js";
|
|
6
|
+
import { o as isExpectedUserError } from "./telemetry-runtime-BufSIW3d.js";
|
|
7
|
+
import { n as handleUserError, t as handleError } from "./handle-error-qi-5p5I2.js";
|
|
8
|
+
import { t as reportErrorToSentry } from "./report-error-BmvMTKij.js";
|
|
9
|
+
import { N as cliLogger, c as spinner, n as findNearestPackageDirectory } from "./install-doctor-script-CzA3N60N.js";
|
|
10
|
+
import { a as readReactDoctorWorkflow, d as detectDefaultBranch, f as runCommand, l as prompts, n as getReactDoctorWorkflowPath, s as upgradeWorkflowActionToV2, t as buildWorkflowContent } from "./install-github-workflow-DqIx2JgD.js";
|
|
11
|
+
import { a as isValidBlockingLevel, c as openWorkflowPullRequest, l as stageWorkflowFile, n as isScopeValue } from "./resolve-scope-DIgYBn32.js";
|
|
12
|
+
import { t as shouldSkipPrompts } from "./should-skip-prompts-BX-idWyW.js";
|
|
13
|
+
import { t as printBrandedHeader } from "./print-branded-header-CO4r1oDZ.js";
|
|
14
14
|
import * as fs$1 from "node:fs";
|
|
15
15
|
import * as path$1 from "node:path";
|
|
16
16
|
//#region src/cli/utils/ci/ci-provider.ts
|
|
@@ -39,6 +39,11 @@ const BLOCKING_CHOICES = [
|
|
|
39
39
|
}
|
|
40
40
|
];
|
|
41
41
|
const SCOPE_CHOICES = [
|
|
42
|
+
{
|
|
43
|
+
value: "contextual",
|
|
44
|
+
title: "Modified contexts",
|
|
45
|
+
description: "Issues in modified functions, JSX elements, or files, as selected by each rule"
|
|
46
|
+
},
|
|
42
47
|
{
|
|
43
48
|
value: "changed",
|
|
44
49
|
title: "New issues",
|
|
@@ -86,6 +91,7 @@ const BLOCKING_SUMMARY = {
|
|
|
86
91
|
error: "Fail the check on new error-level findings"
|
|
87
92
|
};
|
|
88
93
|
const SCOPE_SUMMARY = {
|
|
94
|
+
contextual: "Report issues in modified rule contexts",
|
|
89
95
|
full: "Scan the whole project on every run",
|
|
90
96
|
files: "Report every issue in changed files",
|
|
91
97
|
lines: "Report issues whose source spans touch changed lines",
|
|
@@ -7503,5 +7509,5 @@ const ciConfigAction = (options) => runCiCommand("config", runCiConfig, options)
|
|
|
7503
7509
|
//#endregion
|
|
7504
7510
|
export { ciConfigAction, ciInstallAction, ciUpgradeAction };
|
|
7505
7511
|
|
|
7506
|
-
//# sourceMappingURL=ci-
|
|
7507
|
-
//# debugId=
|
|
7512
|
+
//# sourceMappingURL=ci-dPYHQlYK.js.map
|
|
7513
|
+
//# debugId=5821ba0c-3095-530c-a898-f88bdfaaf275
|
package/dist/cli.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
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]="8ce9aa1f-0a85-514c-9759-6b1c0db96ace")}catch(e){}}();
|
|
3
3
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
|
|
4
4
|
import { lt as CANONICAL_GITHUB_URL, ut as CI_URL } from "./constants-Bwylqy0B.js";
|
|
5
5
|
import "./start-scan-preamble-2uz0joCl.js";
|
|
6
|
-
import {
|
|
7
|
-
import { a as initializeSentry, n as shutdownTelemetry, o as isExpectedUserError, r as flushSentry } from "./telemetry-runtime-
|
|
8
|
-
import { t as exitGracefully } from "./exit-gracefully-
|
|
9
|
-
import { n as handleUserError, t as handleError } from "./handle-error-
|
|
6
|
+
import { Hn as isDirectory, Mt as highlighter, Nt as isPathInsideDirectory, S as isDebugFlagEnabled, Wn as isFile, _ as VERSION, d as isJsonModeActive, en as setColorEnabled, gt as filterSourceFiles, h as writeJsonErrorReport, i as isTelemetryEnabled, y as CliInputError } from "./record-metric-DcSvz1k4.js";
|
|
7
|
+
import { a as initializeSentry, n as shutdownTelemetry, o as isExpectedUserError, r as flushSentry } from "./telemetry-runtime-BufSIW3d.js";
|
|
8
|
+
import { t as exitGracefully } from "./exit-gracefully-C8JRlcU-.js";
|
|
9
|
+
import { n as handleUserError, t as handleError } from "./handle-error-qi-5p5I2.js";
|
|
10
10
|
import { n as getLastRunTraceId } from "./active-run-trace-Dewycxda.js";
|
|
11
|
-
import { t as reportErrorToSentry } from "./report-error-
|
|
11
|
+
import { t as reportErrorToSentry } from "./report-error-BmvMTKij.js";
|
|
12
12
|
import { t as toForwardSlashes } from "./path-format-By20mo8A.js";
|
|
13
13
|
import { t as unrefStdin } from "./unref-stdin-D-NZBFpg.js";
|
|
14
14
|
import * as path$1 from "node:path";
|
|
@@ -3567,9 +3567,9 @@ ${highlighter.dim("Learn more:")}
|
|
|
3567
3567
|
${highlighter.info(CI_URL)}
|
|
3568
3568
|
`;
|
|
3569
3569
|
const collectCategoryOption = (value, previousValues) => [...previousValues ?? [], value];
|
|
3570
|
-
const program = new Command().name("react-doctor").description("Diagnose React codebase health").version(VERSION, "-v, --version", "display the version number").argument("[paths...]", "one project directory or source file paths to scan").option("--lint", "enable linting").option("--no-lint", "skip linting").addOption(new Option("--dead-code").hideHelp()).addOption(new Option("--no-dead-code").hideHelp()).option("--supply-chain", "enable the dependency supply-chain scan (default)").option("--no-supply-chain", "skip the dependency supply-chain scan (Socket.dev dependency health checks)").option("--verbose", "show every rule and per-file details (default shows top 3 rules)").option("--debug", "force a Sentry trace and print its id at the end (paste it into a bug report)").option("--output-dir <dir>", "directory for the full diagnostics dump (default: a temp folder)").option("--score", "output only the score").option("--json", "output a single structured JSON report (suppresses other output)").option("--json-compact", "with --json, emit compact JSON (no indentation)").option("--json-out <path>", "with --json, write the report to a file instead of stdout").option("--no-cache", "disable all scan caches for this run").option("-y, --yes", "skip prompts, scan all workspace projects").option("--no-parallel", "lint serially with one worker (default: parallel across CPU cores; set the worker count with REACT_DOCTOR_PARALLEL)").option("--project <name>", "select projects: workspace names or directory paths (comma-separated for multiple); overrides the `projects` config field").option("--scope <value>", "how much supported JS/TS and inline HTML script source to scan/report: full (default), files, changed (only new issues vs base),
|
|
3570
|
+
const program = new Command().name("react-doctor").description("Diagnose React codebase health").version(VERSION, "-v, --version", "display the version number").argument("[paths...]", "one project directory or source file paths to scan").option("--lint", "enable linting").option("--no-lint", "skip linting").addOption(new Option("--dead-code").hideHelp()).addOption(new Option("--no-dead-code").hideHelp()).option("--supply-chain", "enable the dependency supply-chain scan (default)").option("--no-supply-chain", "skip the dependency supply-chain scan (Socket.dev dependency health checks)").option("--verbose", "show every rule and per-file details (default shows top 3 rules)").option("--debug", "force a Sentry trace and print its id at the end (paste it into a bug report)").option("--output-dir <dir>", "directory for the full diagnostics dump (default: a temp folder)").option("--score", "output only the score").option("--json", "output a single structured JSON report (suppresses other output)").option("--json-compact", "with --json, emit compact JSON (no indentation)").option("--json-out <path>", "with --json, write the report to a file instead of stdout").option("--no-cache", "disable all scan caches for this run").option("-y, --yes", "skip prompts, scan all workspace projects").option("--no-parallel", "lint serially with one worker (default: parallel across CPU cores; set the worker count with REACT_DOCTOR_PARALLEL)").option("--project <name>", "select projects: workspace names or directory paths (comma-separated for multiple); overrides the `projects` config field").option("--scope <value>", "how much supported JS/TS and inline HTML script source to scan/report: full (default), files, changed (only new issues vs base), lines (issues whose source spans touch changed lines), or contextual (issues in modified rule contexts)").option("--base <ref>", "base git ref for files/changed/lines/contextual scope (auto-detected when omitted)").option("--baseline <report.json>", "report only new issues compared with a saved JSON report").option("--include-untracked", "with --scope files/changed/lines/contextual, also scan ordinary untracked files (respects .gitignore)").addOption(new Option("--diff [base]", "[deprecated] alias for --scope changed (pass `false` to force a full scan)").hideHelp()).addOption(new Option("--changed-files-from <file>", "scan source files listed in a newline-delimited changed-files file").hideHelp()).option("--no-score", "skip the score API, the share URL, and crash reporting").addOption(new Option("--category <category>", "only show diagnostics in a category (repeatable; e.g. Security)").argParser(collectCategoryOption)).option("--no-telemetry", "alias for --no-score (skip the score API, share URL, and crash reporting)").option("--staged", "scan only staged (git index) files for pre-commit hooks (honors --project and config `projects`; exits 0 when nothing is staged)").option("--max-duration <seconds>", MAX_DURATION_OPTION_DESCRIPTION).option("--blocking <level>", "severity that fails CI: error (default), warning, or none (advisory)").option("--warning-exit-code <code>", "exit code for non-blocking warnings (2-255). Ignored with --blocking none or --score", parseWarningExitCode).addOption(new Option("--fail-on <level>", "[deprecated] alias for --blocking <level>").hideHelp()).option("--no-respect-inline-disables", "audit mode: neutralize inline lint suppressions before scanning").option("--warnings", "show warning-severity diagnostics (default)").option("--no-warnings", "hide warning-severity diagnostics (errors only)").option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").addHelpText("after", renderRootHelpEpilog);
|
|
3571
3571
|
program.action(async (positionalPaths = [], flags) => {
|
|
3572
|
-
const { runScanCommand } = await import("./scan-
|
|
3572
|
+
const { runScanCommand } = await import("./scan-BTohT6wy.js");
|
|
3573
3573
|
return runScanCommand({
|
|
3574
3574
|
...resolvePositionalScanInput(positionalPaths),
|
|
3575
3575
|
flags,
|
|
@@ -3577,75 +3577,75 @@ program.action(async (positionalPaths = [], flags) => {
|
|
|
3577
3577
|
});
|
|
3578
3578
|
});
|
|
3579
3579
|
program.command("design [directory]").description("Run only the focused UI design diagnostics").addHelpText("after", renderDesignHelpEpilog).action(async (directory, _options, command) => {
|
|
3580
|
-
const { designAction } = await import("./design-
|
|
3580
|
+
const { designAction } = await import("./design-CEbK8378.js");
|
|
3581
3581
|
return designAction(directory ?? ".", command.optsWithGlobals());
|
|
3582
3582
|
});
|
|
3583
3583
|
program.command("scan").description("Scan a React interaction in Chrome until you press Enter").argument("[url]", "HTTP(S) URL of the running React app; detects local apps when omitted").option("-f, --format <format>", "report format: text, json, or jsonl", "text").option("--cdp <url>", "reuse Chrome at this remote-debugging endpoint").option("--trace-out <path>", "save the compressed .json.gz DevTools trace at this path").addHelpText("after", renderRuntimeScanHelpEpilog).action(async (url, options) => {
|
|
3584
|
-
const { runtimeScanAction } = await import("./runtime-scan-
|
|
3584
|
+
const { runtimeScanAction } = await import("./runtime-scan-XUqvrTH4.js");
|
|
3585
3585
|
return runtimeScanAction(url, options);
|
|
3586
3586
|
});
|
|
3587
3587
|
program.command("why <location>").description("Explain why a rule fired (or why a suppression didn't apply) at a file:line").option("--project <name>", "select projects: workspace names or directory paths (comma-separated for multiple)").option("-c, --cwd <cwd>", "working directory", process.cwd()).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").action(async (location, options) => {
|
|
3588
|
-
const { whyAction } = await import("./why-
|
|
3588
|
+
const { whyAction } = await import("./why-BJoyzEcf.js");
|
|
3589
3589
|
return whyAction(location, options);
|
|
3590
3590
|
});
|
|
3591
3591
|
program.command("install").alias("setup").description("Install the react-doctor skill into your coding agents and optional git hook").option("-y, --yes", "skip prompts, install for all detected agents").option("--dry-run", "show what would be installed without writing files").option("--agent-hooks", "install end-of-turn agent hooks for Claude Code and Cursor").option("-c, --cwd <cwd>", "working directory", process.cwd()).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").addHelpText("after", renderInstallHelpEpilog).action(async (options, command) => {
|
|
3592
|
-
const { installAction } = await import("./install-
|
|
3592
|
+
const { installAction } = await import("./install-R-4Yhbnt.js");
|
|
3593
3593
|
return installAction(options, command);
|
|
3594
3594
|
});
|
|
3595
3595
|
const providerOption = ["--provider <name>", "ci provider: github-actions or gitlab-ci (auto-detected by default)"];
|
|
3596
3596
|
const prOption = ["--pr", "open a pull request with the change instead of writing it to the working tree"];
|
|
3597
3597
|
const ci = program.command("ci").description("Set up, upgrade, and configure React Doctor in your CI");
|
|
3598
3598
|
ci.command("install").description("Add a CI workflow that scans every pull request").option(...providerOption).option(...prOption).option("--blocking <level>", "gate level: none (advisory, default), warning, or error").option("--scope <value>", "what a pull-request scan reports: changed (default), files, lines, full").option("--comment", "post a summary comment on each pull request").option("--no-comment", "don't post a summary comment").option("--review-comments", "add inline review comments on changed lines").option("--no-review-comments", "don't add inline review comments").option("--commit-status", "report a commit status with the health score").option("--no-commit-status", "don't report a commit status").option("-y, --yes", "skip prompts; use the defaults").option("-c, --cwd <cwd>", "working directory", process.cwd()).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").addHelpText("after", renderCiHelpEpilog).action(async (_options, command) => {
|
|
3599
|
-
const { ciInstallAction } = await import("./ci-
|
|
3599
|
+
const { ciInstallAction } = await import("./ci-dPYHQlYK.js");
|
|
3600
3600
|
return ciInstallAction(command.optsWithGlobals());
|
|
3601
3601
|
});
|
|
3602
|
-
ci.command("config").description("Change the gate, scan scope, and pull-request reporting").option(...providerOption).option("--blocking <level>", "gate level: none (advisory), warning, or error").option("--scope <value>", "what a pull-request scan reports: changed, files, lines, or full").option("--comment", "post a summary comment on each pull request").option("--no-comment", "don't post a summary comment").option("--review-comments", "add inline review comments on changed lines").option("--no-review-comments", "don't add inline review comments").option("--commit-status", "report a commit status with the health score").option("--no-commit-status", "don't report a commit status").option("-y, --yes", "skip prompts; print the current settings").option("-c, --cwd <cwd>", "working directory", process.cwd()).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").action(async (_options, command) => {
|
|
3603
|
-
const { ciConfigAction } = await import("./ci-
|
|
3602
|
+
ci.command("config").description("Change the gate, scan scope, and pull-request reporting").option(...providerOption).option("--blocking <level>", "gate level: none (advisory), warning, or error").option("--scope <value>", "what a pull-request scan reports: changed, files, lines, contextual, or full").option("--comment", "post a summary comment on each pull request").option("--no-comment", "don't post a summary comment").option("--review-comments", "add inline review comments on changed lines").option("--no-review-comments", "don't add inline review comments").option("--commit-status", "report a commit status with the health score").option("--no-commit-status", "don't report a commit status").option("-y, --yes", "skip prompts; print the current settings").option("-c, --cwd <cwd>", "working directory", process.cwd()).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").action(async (_options, command) => {
|
|
3603
|
+
const { ciConfigAction } = await import("./ci-dPYHQlYK.js");
|
|
3604
3604
|
return ciConfigAction(command.optsWithGlobals());
|
|
3605
3605
|
});
|
|
3606
3606
|
ci.command("upgrade").description("Upgrade the CI workflow to the action's current major").option(...providerOption).option(...prOption).option("-y, --yes", "skip prompts").option("-c, --cwd <cwd>", "working directory", process.cwd()).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").action(async (_options, command) => {
|
|
3607
|
-
const { ciUpgradeAction } = await import("./ci-
|
|
3607
|
+
const { ciUpgradeAction } = await import("./ci-dPYHQlYK.js");
|
|
3608
3608
|
return ciUpgradeAction(command.optsWithGlobals());
|
|
3609
3609
|
});
|
|
3610
3610
|
program.command("version").description("show the version with Node and platform info").option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").action(async () => {
|
|
3611
|
-
const { versionAction } = await import("./version-
|
|
3611
|
+
const { versionAction } = await import("./version-BVBbh_L8.js");
|
|
3612
3612
|
return versionAction();
|
|
3613
3613
|
});
|
|
3614
3614
|
const rules = program.command("rules").description("List, explain, and configure which React Doctor rules run");
|
|
3615
3615
|
rules.command("list").description("List rules and the severity they run at under your config").option("--category <name>", "only show rules in a category (e.g. Performance)").option("--tag <name>", "only show rules with a tag (e.g. design, test-noise)").option("--framework <name>", "only show rules for a framework (e.g. global, nextjs)").option("--configured", "only show rules your config has changed from the default").option("--json", "output a structured JSON array").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (_options, command) => {
|
|
3616
|
-
const { rulesListAction } = await import("./rules-
|
|
3616
|
+
const { rulesListAction } = await import("./rules-H0yqeV5v.js");
|
|
3617
3617
|
return rulesListAction(command.optsWithGlobals());
|
|
3618
3618
|
});
|
|
3619
3619
|
rules.command("explain <rule>").description("Explain why a rule matters, its current severity, and how to configure it").option("--json", "output a structured JSON object").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (rule, _options, command) => {
|
|
3620
|
-
const { rulesExplainAction } = await import("./rules-
|
|
3620
|
+
const { rulesExplainAction } = await import("./rules-H0yqeV5v.js");
|
|
3621
3621
|
return rulesExplainAction(rule, command.optsWithGlobals());
|
|
3622
3622
|
});
|
|
3623
3623
|
rules.command("set <rule> <severity>").description("Set a rule's severity: off, warn, or error").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (rule, severity, _options, command) => {
|
|
3624
|
-
const { rulesSetAction } = await import("./rules-
|
|
3624
|
+
const { rulesSetAction } = await import("./rules-H0yqeV5v.js");
|
|
3625
3625
|
return rulesSetAction(rule, severity, command.optsWithGlobals());
|
|
3626
3626
|
});
|
|
3627
3627
|
rules.command("enable <rule>").description("Enable a rule at its recommended severity (or pass --severity)").option("--severity <level>", "severity to enable at: warn or error").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (rule, _options, command) => {
|
|
3628
|
-
const { rulesEnableAction } = await import("./rules-
|
|
3628
|
+
const { rulesEnableAction } = await import("./rules-H0yqeV5v.js");
|
|
3629
3629
|
return rulesEnableAction(rule, command.optsWithGlobals());
|
|
3630
3630
|
});
|
|
3631
3631
|
rules.command("disable <rule>").description("Disable a rule so it never runs").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (rule, _options, command) => {
|
|
3632
|
-
const { rulesDisableAction } = await import("./rules-
|
|
3632
|
+
const { rulesDisableAction } = await import("./rules-H0yqeV5v.js");
|
|
3633
3633
|
return rulesDisableAction(rule, command.optsWithGlobals());
|
|
3634
3634
|
});
|
|
3635
3635
|
rules.command("category <category> <severity>").description("Set the severity for a whole category (off, warn, error)").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (category, severity, _options, command) => {
|
|
3636
|
-
const { rulesCategoryAction } = await import("./rules-
|
|
3636
|
+
const { rulesCategoryAction } = await import("./rules-H0yqeV5v.js");
|
|
3637
3637
|
return rulesCategoryAction(category, severity, command.optsWithGlobals());
|
|
3638
3638
|
});
|
|
3639
3639
|
rules.command("ignore-tag <tag>").description("Skip a whole rule family by tag before linting (e.g. design)").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (tag, _options, command) => {
|
|
3640
|
-
const { rulesIgnoreTagAction } = await import("./rules-
|
|
3640
|
+
const { rulesIgnoreTagAction } = await import("./rules-H0yqeV5v.js");
|
|
3641
3641
|
return rulesIgnoreTagAction(tag, command.optsWithGlobals());
|
|
3642
3642
|
});
|
|
3643
3643
|
rules.command("unignore-tag <tag>").description("Stop ignoring a tag previously skipped via ignore-tag").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (tag, _options, command) => {
|
|
3644
|
-
const { rulesUnignoreTagAction } = await import("./rules-
|
|
3644
|
+
const { rulesUnignoreTagAction } = await import("./rules-H0yqeV5v.js");
|
|
3645
3645
|
return rulesUnignoreTagAction(tag, command.optsWithGlobals());
|
|
3646
3646
|
});
|
|
3647
3647
|
program.command("experimental-tui [directory]", { hidden: true }).description("[experimental] interactive, scrollable scan report").option("--blocking <level>", "severity that fails CI: error (default), warning, or none (advisory)").option("--warning-exit-code <code>", "exit code for non-blocking warnings (2-255). Ignored with --blocking none or --score", parseWarningExitCode).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").addOption(new Option("--no-dead-code").hideHelp()).option("--no-supply-chain", "skip the dependency supply-chain scan").option("--score", "only print the numeric score (for scripts and CI)").option("--no-score", "skip the score API, the share URL, and crash reporting").option("--no-cache", "disable all scan caches for this run").option("--max-duration <seconds>", MAX_DURATION_OPTION_DESCRIPTION).option("-p, --project <names>", "scan specific workspace projects (comma-separated, or *)").option("-y, --yes", "skip the project prompt and scan every discovered project").action(async (directory = ".", _localOptions, command) => {
|
|
3648
|
-
const { runScanCommand } = await import("./scan-
|
|
3648
|
+
const { runScanCommand } = await import("./scan-BTohT6wy.js");
|
|
3649
3649
|
return runScanCommand({
|
|
3650
3650
|
directory,
|
|
3651
3651
|
flags: command.optsWithGlobals(),
|
|
@@ -3685,4 +3685,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
|
|
|
3685
3685
|
export {};
|
|
3686
3686
|
|
|
3687
3687
|
//# sourceMappingURL=cli.js.map
|
|
3688
|
-
//# debugId=
|
|
3688
|
+
//# debugId=8ce9aa1f-0a85-514c-9759-6b1c0db96ace
|
|
@@ -1,6 +1,6 @@
|
|
|
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]="
|
|
3
|
-
import { t as inspectAction } from "./inspect-
|
|
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]="d38b8cd9-5e0f-5204-944d-c1dba620d1f0")}catch(e){}}();
|
|
3
|
+
import { t as inspectAction } from "./inspect-BJE38z7r.js";
|
|
4
4
|
//#region src/cli/commands/design.ts
|
|
5
5
|
const designAction = async (directory, flags) => inspectAction(directory, {
|
|
6
6
|
...flags,
|
|
@@ -10,5 +10,5 @@ const designAction = async (directory, flags) => inspectAction(directory, {
|
|
|
10
10
|
//#endregion
|
|
11
11
|
export { designAction };
|
|
12
12
|
|
|
13
|
-
//# sourceMappingURL=design-
|
|
14
|
-
//# debugId=
|
|
13
|
+
//# sourceMappingURL=design-CEbK8378.js.map
|
|
14
|
+
//# debugId=d38b8cd9-5e0f-5204-944d-c1dba620d1f0
|
|
@@ -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]="dd62388e-7fa5-5466-9293-75c1091a30f7")}catch(e){}}();
|
|
3
3
|
import { t as typescriptBinding } from "./_react-doctor_require-typescript-DXQDYeWK.js";
|
|
4
4
|
import { t as unwrapTypescriptExpression } from "./unwrap-typescript-expression-CrEPQUWz.js";
|
|
5
5
|
import { i as JSX_DUPLICATION_SOURCE_FILE_PATTERN } from "./constants-DNh19qg9.js";
|
|
@@ -80,7 +80,7 @@ const createJsxSourceReader = (input) => {
|
|
|
80
80
|
const getTypescriptScriptKind = (fileName) => {
|
|
81
81
|
if (fileName.endsWith(".tsx")) return typescriptBinding.ScriptKind.TSX;
|
|
82
82
|
if (fileName.endsWith(".jsx")) return typescriptBinding.ScriptKind.JSX;
|
|
83
|
-
if (fileName
|
|
83
|
+
if (/\.[cm]?ts$/.test(fileName)) return typescriptBinding.ScriptKind.TS;
|
|
84
84
|
return typescriptBinding.ScriptKind.JS;
|
|
85
85
|
};
|
|
86
86
|
//#endregion
|
|
@@ -633,4 +633,4 @@ startDuplicateJsxWorker();
|
|
|
633
633
|
export {};
|
|
634
634
|
|
|
635
635
|
//# sourceMappingURL=duplicate-jsx-worker.js.map
|
|
636
|
-
//# debugId=
|
|
636
|
+
//# debugId=dd62388e-7fa5-5466-9293-75c1091a30f7
|
|
@@ -1,9 +1,9 @@
|
|
|
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]="
|
|
3
|
-
import { d as isJsonModeActive, m as writeJsonCancellationReport } from "./record-metric-
|
|
4
|
-
import { n as shutdownTelemetry, r as flushSentry } from "./telemetry-runtime-
|
|
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]="fa62a40a-43dd-5d6a-a9d7-e0a9e3ca221b")}catch(e){}}();
|
|
3
|
+
import { d as isJsonModeActive, m as writeJsonCancellationReport } from "./record-metric-DcSvz1k4.js";
|
|
4
|
+
import { n as shutdownTelemetry, r as flushSentry } from "./telemetry-runtime-BufSIW3d.js";
|
|
5
5
|
import { t as activeScanAbortRegistry } from "./active-scan-abort-registry-CCTgal0O.js";
|
|
6
|
-
import { n as buildFooterLinkLines, t as buildSectionDivider } from "./build-section-divider-
|
|
6
|
+
import { n as buildFooterLinkLines, t as buildSectionDivider } from "./build-section-divider-BlNg8CJ3.js";
|
|
7
7
|
//#region src/cli/utils/active-tui-renderer.ts
|
|
8
8
|
let activeTuiRenderer = null;
|
|
9
9
|
const registerActiveTuiRenderer = (renderer) => {
|
|
@@ -50,5 +50,5 @@ const exitGracefully = () => {
|
|
|
50
50
|
//#endregion
|
|
51
51
|
export { registerActiveTuiRenderer as n, exitGracefully as t };
|
|
52
52
|
|
|
53
|
-
//# sourceMappingURL=exit-gracefully-
|
|
54
|
-
//# debugId=
|
|
53
|
+
//# sourceMappingURL=exit-gracefully-C8JRlcU-.js.map
|
|
54
|
+
//# debugId=fa62a40a-43dd-5d6a-a9d7-e0a9e3ca221b
|
|
@@ -1,8 +1,8 @@
|
|
|
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]="301d3ff7-d015-54ca-b5e8-0ebed96c4deb")}catch(e){}}();
|
|
3
3
|
import { ct as CANONICAL_DISCORD_URL, lt as CANONICAL_GITHUB_URL, u as METRIC } from "./constants-Bwylqy0B.js";
|
|
4
|
-
import {
|
|
5
|
-
import { c as isNpmCacheCorruptionError, l as formatEnvironmentError, s as formatNpmCacheCorruptionError, u as isEnvironmentError } from "./telemetry-runtime-
|
|
4
|
+
import { Ft as isReactDoctorError, Mt as highlighter, Tn as runSync, Un as isErrnoException, _ as VERSION, bt as formatErrorChain, cn as error, gn as gen, t as recordCount, xt as formatReactDoctorError } from "./record-metric-DcSvz1k4.js";
|
|
5
|
+
import { c as isNpmCacheCorruptionError, l as formatEnvironmentError, s as formatNpmCacheCorruptionError, u as isEnvironmentError } from "./telemetry-runtime-BufSIW3d.js";
|
|
6
6
|
//#region src/cli/utils/handle-error.ts
|
|
7
7
|
const OTLP_ENDPOINT_ENVIRONMENT_VARIABLE = "REACT_DOCTOR_OTLP_ENDPOINT";
|
|
8
8
|
const OTLP_AUTH_HEADER_ENVIRONMENT_VARIABLE = "REACT_DOCTOR_OTLP_AUTH_HEADER";
|
|
@@ -111,5 +111,5 @@ const handleUserError = (error$1, options = {}) => {
|
|
|
111
111
|
//#endregion
|
|
112
112
|
export { handleUserError as n, handleError as t };
|
|
113
113
|
|
|
114
|
-
//# sourceMappingURL=handle-error-
|
|
115
|
-
//# debugId=
|
|
114
|
+
//# sourceMappingURL=handle-error-qi-5p5I2.js.map
|
|
115
|
+
//# debugId=301d3ff7-d015-54ca-b5e8-0ebed96c4deb
|
package/dist/index.d.ts
CHANGED
|
@@ -341,7 +341,7 @@ interface Pipeable {
|
|
|
341
341
|
*/
|
|
342
342
|
declare const Class$1: new () => Pipeable;
|
|
343
343
|
//#endregion
|
|
344
|
-
//#region ../core/dist/resolve-scan-concurrency-
|
|
344
|
+
//#region ../core/dist/resolve-scan-concurrency-NI_fN2UJ.d.ts
|
|
345
345
|
/**
|
|
346
346
|
* A secondary source location attached to a diagnostic (oxlint's
|
|
347
347
|
* non-primary labels). Editors render these as
|
|
@@ -434,7 +434,7 @@ type BlockingLevel = "error" | "warning" | "none";
|
|
|
434
434
|
/**
|
|
435
435
|
* How much of the project a scan looks at and reports on — the single knob the
|
|
436
436
|
* CLI `--scope` flag, the GitHub Action `scope` input, and this config field
|
|
437
|
-
* all share
|
|
437
|
+
* all share:
|
|
438
438
|
*
|
|
439
439
|
* - `"full"` — whole project, every issue (the default). Environment and
|
|
440
440
|
* supply-chain checks run only at this scope.
|
|
@@ -443,8 +443,9 @@ type BlockingLevel = "error" | "warning" | "none";
|
|
|
443
443
|
* - `"changed"` — only issues the change INTRODUCED vs the base (the baseline
|
|
444
444
|
* delta). What `--diff <base>` and the action's `scope: changed` do today.
|
|
445
445
|
* - `"lines"` — only issues on the lines the change actually touched.
|
|
446
|
+
* - `"contextual"` — issues in modified functions, JSX elements, or files, as selected by each rule.
|
|
446
447
|
*/
|
|
447
|
-
type ScopeValue = "full" | "files" | "changed" | "lines";
|
|
448
|
+
type ScopeValue = "full" | "files" | "changed" | "lines" | "contextual";
|
|
448
449
|
interface ReactDoctorIgnoreOverride {
|
|
449
450
|
/** Glob patterns the override applies to (e.g. `["src/legacy/**"]`). */
|
|
450
451
|
files: string[];
|
|
@@ -627,13 +628,13 @@ interface ReactDoctorConfig {
|
|
|
627
628
|
*/
|
|
628
629
|
warnings?: boolean;
|
|
629
630
|
/**
|
|
630
|
-
* Scan scope. Defaults to `"full"`. See `ScopeValue` for the
|
|
631
|
+
* Scan scope. Defaults to `"full"`. See `ScopeValue` for the supported values.
|
|
631
632
|
* The CLI `--scope` flag and the GitHub Action `scope` input set the same
|
|
632
633
|
* thing; flags win over config.
|
|
633
634
|
*/
|
|
634
635
|
scope?: ScopeValue;
|
|
635
636
|
/**
|
|
636
|
-
* Base git ref the `"files"` / `"changed"` / `"lines"` scopes compare
|
|
637
|
+
* Base git ref the `"files"` / `"changed"` / `"lines"` / `"contextual"` scopes compare
|
|
637
638
|
* against. Auto-detected from the default branch / merge-base when unset.
|
|
638
639
|
*/
|
|
639
640
|
base?: string;
|
|
@@ -661,6 +662,12 @@ interface ReactDoctorConfig {
|
|
|
661
662
|
* one-time deprecation warning. Prefer `blocking`.
|
|
662
663
|
*/
|
|
663
664
|
failOn?: BlockingLevel;
|
|
665
|
+
/**
|
|
666
|
+
* Disable ported rules by default. Explicit `rules` settings of `"warn"`
|
|
667
|
+
* or `"error"` enable selected ported rules, including legacy rule names.
|
|
668
|
+
* Category settings do not enable them. Project requirements and tag
|
|
669
|
+
* exclusions still apply, and the React Compiler plugin stays disabled.
|
|
670
|
+
*/
|
|
664
671
|
customRulesOnly?: boolean;
|
|
665
672
|
share?: boolean;
|
|
666
673
|
noScore?: boolean;
|