react-doctor 0.9.17 → 0.9.18-dev.813bd63

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.
Files changed (43) hide show
  1. package/README.md +16 -72
  2. package/dist/{build-section-divider-BpE5NDDX.js → build-section-divider-dm7eyygx.js} +5 -5
  3. package/dist/{ci-DNtt9X6S.js → ci-Cs3iD71x.js} +24 -14
  4. package/dist/cli.js +41 -32
  5. package/dist/{constants-DHn5rUeg.js → constants-ClqojoT2.js} +8 -5
  6. package/dist/constants-DNh19qg9.js +2 -2
  7. package/dist/{design-u2afuNir.js → design-5HU24djx.js} +4 -4
  8. package/dist/duplicate-jsx-worker.js +3 -3
  9. package/dist/{exit-gracefully-DlI5QxjC.js → exit-gracefully-wYeFSUnb.js} +6 -6
  10. package/dist/{handle-error-ChH7NTTt.js → handle-error-SLUu0g1m.js} +6 -6
  11. package/dist/index.d.ts +14 -6
  12. package/dist/index.js +334 -58
  13. package/dist/{inspect-BEMrqB0D.js → inspect-cPD5eW0z.js} +31 -23
  14. package/dist/{install-rmw4kZuQ.js → install-CZefUZ92.js} +10 -10
  15. package/dist/{install-doctor-script-D5XbyGON.js → install-doctor-script-B8Xe0Mag.js} +10 -6
  16. package/dist/{install-github-workflow-bsR3MAJ4.js → install-github-workflow-BxDIC-U8.js} +22 -8
  17. package/dist/{install-react-doctor-CEZd9boZ.js → install-react-doctor-B8C1JYku.js} +9 -9
  18. package/dist/{is-cache-globally-disabled-DDlh_f1u.js → is-cache-globally-disabled-DnyI809X.js} +4 -4
  19. package/dist/{jsx-runtime-RhgTgCyJ.js → jsx-runtime-CI4NT3b7.js} +6 -6
  20. package/dist/{print-branded-header-DUpSxfB1.js → print-branded-header-C76LxHJV.js} +4 -4
  21. package/dist/{prompt-runtime-scan-url-ClnyA-kD.js → prompt-runtime-scan-url-JEKSBImN.js} +5 -5
  22. package/dist/{read-object-file-BmbbCthv.js → read-object-file-BS-5zIix.js} +4 -4
  23. package/dist/{record-metric-BNXhF2A-.js → record-metric-D2Sa2-8-.js} +440 -84
  24. package/dist/{report-error-BaQdqDfo.js → report-error-2AuVnp86.js} +6 -6
  25. package/dist/{report-workflow-result-keduRDKN.js → report-workflow-result-BaBn-KfJ.js} +8 -7
  26. package/dist/{should-fail-scan-gate-DobEL_kS.js → resolve-scan-exit-code-jAj4CxMz.js} +38 -41
  27. package/dist/{resolve-scope-_R9av4PA.js → resolve-scope-DagI1fQi.js} +10 -9
  28. package/dist/{rules-mbLozamL.js → rules-C8iVdbp-.js} +7 -7
  29. package/dist/{run-scan-app-yG6ELpUl.js → run-scan-app-CjXVZiDW.js} +33 -23
  30. package/dist/{runtime-scan-DNhYo683.js → runtime-scan-CjpmdWgB.js} +10 -10
  31. package/dist/{sanitize-runtime-url-DM_qbPGY.js → sanitize-runtime-url-T9kZq9xg.js} +4 -4
  32. package/dist/{scan-CAAixMS9.js → scan-yyDeSdpu.js} +14 -13
  33. package/dist/{should-skip-prompts-CGTEgq2F.js → should-skip-prompts-CgXCf-fu.js} +4 -4
  34. package/dist/{should-use-tui-DG2l-Td3.js → should-use-tui-ChbrCcWt.js} +4 -4
  35. package/dist/skills/react-doctor/SKILL.md +19 -8
  36. package/dist/skills/react-doctor/references/explain.md +5 -0
  37. package/dist/{start-scan-preamble-BPz3nzCQ.js → start-scan-preamble-DgEn5GlY.js} +5 -5
  38. package/dist/start-scan-preamble.js +3 -3
  39. package/dist/{telemetry-runtime-CUn1--rM.js → telemetry-runtime-d441ptET.js} +7 -7
  40. package/dist/{version-CbFBCUY9.js → version-Dsv4KbVD.js} +5 -5
  41. package/dist/{why-BIX2FUbP.js → why-BtPJ-AQi.js} +4 -4
  42. package/dist/{with-run-span-BsS7dU6e.js → with-run-span-CKkLeVWr.js} +6 -6
  43. package/package.json +4 -4
@@ -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]="520efd75-abbb-56aa-9e53-1b5845707ee0")}catch(e){}}();
3
- import { ct as CANONICAL_DISCORD_URL, lt as CANONICAL_GITHUB_URL, u as METRIC } from "./constants-DHn5rUeg.js";
4
- import { At as highlighter, Cn as runSync, Nt as isReactDoctorError, Vn as isErrnoException, _ as VERSION, mn as gen, on as error, t as recordCount, vt as formatErrorChain, yt as formatReactDoctorError } from "./record-metric-BNXhF2A-.js";
5
- import { c as isNpmCacheCorruptionError, l as formatEnvironmentError, s as formatNpmCacheCorruptionError, u as isEnvironmentError } from "./telemetry-runtime-CUn1--rM.js";
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]="ea77e99a-3321-52f7-9a01-2ea5fb6393fc")}catch(e){}}();
3
+ import { ct as CANONICAL_DISCORD_URL, lt as CANONICAL_GITHUB_URL, u as METRIC } from "./constants-ClqojoT2.js";
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-D2Sa2-8-.js";
5
+ import { c as isNpmCacheCorruptionError, l as formatEnvironmentError, s as formatNpmCacheCorruptionError, u as isEnvironmentError } from "./telemetry-runtime-d441ptET.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-ChH7NTTt.js.map
115
- //# debugId=520efd75-abbb-56aa-9e53-1b5845707ee0
114
+ //# sourceMappingURL=handle-error-SLUu0g1m.js.map
115
+ //# debugId=ea77e99a-3321-52f7-9a01-2ea5fb6393fc
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import fs from "node:fs";
2
- import { FrameworkToken } from "oxlint-plugin-react-doctor/core";
2
+ import { DiagnosticContextRange, FrameworkToken } from "oxlint-plugin-react-doctor/core";
3
3
 
4
4
  //#region ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Types.d.ts
5
5
  /**
@@ -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-DJ7pmvUB.d.ts
344
+ //#region ../core/dist/resolve-scan-concurrency-noGIah1l.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
@@ -363,6 +363,7 @@ interface DiagnosticRelatedLocation {
363
363
  }
364
364
  type DiagnosticFileContext = "test" | "story" | "production";
365
365
  interface Diagnostic {
366
+ contextRanges?: ReadonlyArray<DiagnosticContextRange>;
366
367
  fingerprint?: string;
367
368
  filePath: string;
368
369
  plugin: string;
@@ -434,7 +435,7 @@ type BlockingLevel = "error" | "warning" | "none";
434
435
  /**
435
436
  * How much of the project a scan looks at and reports on — the single knob the
436
437
  * CLI `--scope` flag, the GitHub Action `scope` input, and this config field
437
- * all share. Ordered widest to narrowest:
438
+ * all share:
438
439
  *
439
440
  * - `"full"` — whole project, every issue (the default). Environment and
440
441
  * supply-chain checks run only at this scope.
@@ -443,8 +444,9 @@ type BlockingLevel = "error" | "warning" | "none";
443
444
  * - `"changed"` — only issues the change INTRODUCED vs the base (the baseline
444
445
  * delta). What `--diff <base>` and the action's `scope: changed` do today.
445
446
  * - `"lines"` — only issues on the lines the change actually touched.
447
+ * - `"contextual"` — issues in modified functions, JSX elements, or files, as selected by each rule.
446
448
  */
447
- type ScopeValue = "full" | "files" | "changed" | "lines";
449
+ type ScopeValue = "full" | "files" | "changed" | "lines" | "contextual";
448
450
  interface ReactDoctorIgnoreOverride {
449
451
  /** Glob patterns the override applies to (e.g. `["src/legacy/**"]`). */
450
452
  files: string[];
@@ -627,13 +629,13 @@ interface ReactDoctorConfig {
627
629
  */
628
630
  warnings?: boolean;
629
631
  /**
630
- * Scan scope. Defaults to `"full"`. See `ScopeValue` for the four values.
632
+ * Scan scope. Defaults to `"full"`. See `ScopeValue` for the supported values.
631
633
  * The CLI `--scope` flag and the GitHub Action `scope` input set the same
632
634
  * thing; flags win over config.
633
635
  */
634
636
  scope?: ScopeValue;
635
637
  /**
636
- * Base git ref the `"files"` / `"changed"` / `"lines"` scopes compare
638
+ * Base git ref the `"files"` / `"changed"` / `"lines"` / `"contextual"` scopes compare
637
639
  * against. Auto-detected from the default branch / merge-base when unset.
638
640
  */
639
641
  base?: string;
@@ -661,6 +663,12 @@ interface ReactDoctorConfig {
661
663
  * one-time deprecation warning. Prefer `blocking`.
662
664
  */
663
665
  failOn?: BlockingLevel;
666
+ /**
667
+ * Disable ported rules by default. Explicit `rules` settings of `"warn"`
668
+ * or `"error"` enable selected ported rules, including legacy rule names.
669
+ * Category settings do not enable them. Project requirements and tag
670
+ * exclusions still apply, and the React Compiler plugin stays disabled.
671
+ */
664
672
  customRulesOnly?: boolean;
665
673
  share?: boolean;
666
674
  noScore?: boolean;