react-doctor 0.5.6-dev.f45cb29 → 0.5.7-dev.0b4f4f4
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/dist/cli.js +2030 -626
- package/dist/index.d.ts +38 -4
- package/dist/index.js +1217 -319
- package/dist/lsp.js +1236 -343
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -9280,9 +9280,10 @@ interface ReactDoctorConfig {
|
|
|
9280
9280
|
* list, user-provided names are treated as distinctive and never
|
|
9281
9281
|
* subject to receiver-object disambiguation.
|
|
9282
9282
|
*
|
|
9283
|
-
*
|
|
9284
|
-
*
|
|
9285
|
-
*
|
|
9283
|
+
* Common guard conventions are already recognized automatically
|
|
9284
|
+
* (`requireAdmin`, `ensureSignedIn`, `getCurrentUser`, `hasRole`, …),
|
|
9285
|
+
* so this is only needed for domain-specific guards whose names carry
|
|
9286
|
+
* no auth noun — e.g. a project-local `requireWorkspaceMember`.
|
|
9286
9287
|
*/
|
|
9287
9288
|
serverAuthFunctionNames?: string[];
|
|
9288
9289
|
/**
|
|
@@ -9488,6 +9489,15 @@ interface Diagnostic {
|
|
|
9488
9489
|
suppressionHint?: string;
|
|
9489
9490
|
/** Secondary source locations (oxlint's non-primary labels). */
|
|
9490
9491
|
relatedLocations?: DiagnosticRelatedLocation[];
|
|
9492
|
+
/**
|
|
9493
|
+
* Stable id shared by every finding that a single fix resolves together —
|
|
9494
|
+
* e.g. four `useEffect`s that reset state on one prop change all clear with
|
|
9495
|
+
* one `key` prop. Set only when ≥2 findings share a root cause; absent for
|
|
9496
|
+
* standalone findings. A consumer that turns findings into work items should
|
|
9497
|
+
* group by it so one fix reads as one task, not N. Presentation-only and
|
|
9498
|
+
* score-neutral — the score never reads it.
|
|
9499
|
+
*/
|
|
9500
|
+
fixGroupId?: string;
|
|
9491
9501
|
}
|
|
9492
9502
|
//#endregion
|
|
9493
9503
|
//#region src/types/project-info.d.ts
|
|
@@ -9712,6 +9722,14 @@ interface InspectResult {
|
|
|
9712
9722
|
* summary to report combined scan time.
|
|
9713
9723
|
*/
|
|
9714
9724
|
scanElapsedMilliseconds?: number;
|
|
9725
|
+
/**
|
|
9726
|
+
* Per-file lint cache outcome: files served from cache, and total files
|
|
9727
|
+
* considered. Both absent when the cache was off or bypassed (audit mode,
|
|
9728
|
+
* adopted `extends`, user plugins). The CLI projects these onto the Sentry
|
|
9729
|
+
* wide event as `lintCacheHitRatio`.
|
|
9730
|
+
*/
|
|
9731
|
+
lintCacheHitFileCount?: number | null;
|
|
9732
|
+
lintCacheTotalFileCount?: number | null;
|
|
9715
9733
|
/**
|
|
9716
9734
|
* Present only for a baseline run (`InspectOptions.baseline` set). The
|
|
9717
9735
|
* `diagnostics` above are then the *introduced* findings only; this
|
|
@@ -9793,6 +9811,16 @@ interface JsonReportProjectEntry {
|
|
|
9793
9811
|
skippedChecks: string[];
|
|
9794
9812
|
/** Human-readable explanation per skipped check. See `InspectResult.skippedCheckReasons`. */
|
|
9795
9813
|
skippedCheckReasons?: Record<string, string>;
|
|
9814
|
+
/**
|
|
9815
|
+
* Number of source files this scan's linter examined. In diff / changed
|
|
9816
|
+
* mode it's the count of changed React-eligible files (`.tsx`/`.jsx` plus
|
|
9817
|
+
* framework entry files); in a full scan it's the whole source tree. `0`
|
|
9818
|
+
* in a diff scan means the changed files held nothing React Doctor lints —
|
|
9819
|
+
* the GitHub Action reads that as "nothing to report" (skips the PR comment;
|
|
9820
|
+
* the commit status says "skipped"). Optional: absent on reports from
|
|
9821
|
+
* constructors that don't track it (e.g. `toJsonReport`).
|
|
9822
|
+
*/
|
|
9823
|
+
scannedFileCount?: number;
|
|
9796
9824
|
elapsedMilliseconds: number;
|
|
9797
9825
|
}
|
|
9798
9826
|
interface JsonReportSummary {
|
|
@@ -9928,6 +9956,12 @@ declare const OxlintBatchExceeded_base: Class<OxlintBatchExceeded, TaggedStruct<
|
|
|
9928
9956
|
declare class OxlintBatchExceeded extends OxlintBatchExceeded_base {
|
|
9929
9957
|
get message(): string;
|
|
9930
9958
|
}
|
|
9959
|
+
declare const ScanDeadlineExceeded_base: Class<ScanDeadlineExceeded, TaggedStruct<"ScanDeadlineExceeded", {
|
|
9960
|
+
readonly detail: String;
|
|
9961
|
+
}>, YieldableError>;
|
|
9962
|
+
declare class ScanDeadlineExceeded extends ScanDeadlineExceeded_base {
|
|
9963
|
+
get message(): string;
|
|
9964
|
+
}
|
|
9931
9965
|
declare const OxlintSpawnFailed_base: Class<OxlintSpawnFailed, TaggedStruct<"OxlintSpawnFailed", {
|
|
9932
9966
|
readonly cause: Unknown;
|
|
9933
9967
|
}>, YieldableError>;
|
|
@@ -9993,7 +10027,7 @@ declare class GitBaseBranchInvalid extends GitBaseBranchInvalid_base {
|
|
|
9993
10027
|
get message(): string;
|
|
9994
10028
|
}
|
|
9995
10029
|
declare const ReactDoctorError_base: Class<ReactDoctorError, TaggedStruct<"ReactDoctorError", {
|
|
9996
|
-
readonly reason: Union<readonly [typeof OxlintUnavailable, typeof OxlintBatchExceeded, typeof OxlintSpawnFailed, typeof OxlintOutputUnparseable, typeof ConfigParseFailed, typeof ProjectNotFound, typeof NoReactDependency, typeof AmbiguousProject, typeof DeadCodeAnalysisFailed, typeof GitInvocationFailed, typeof GitBaseBranchMissing, typeof GitBaseBranchInvalid]>;
|
|
10030
|
+
readonly reason: Union<readonly [typeof OxlintUnavailable, typeof OxlintBatchExceeded, typeof ScanDeadlineExceeded, typeof OxlintSpawnFailed, typeof OxlintOutputUnparseable, typeof ConfigParseFailed, typeof ProjectNotFound, typeof NoReactDependency, typeof AmbiguousProject, typeof DeadCodeAnalysisFailed, typeof GitInvocationFailed, typeof GitBaseBranchMissing, typeof GitBaseBranchInvalid]>;
|
|
9997
10031
|
}>, YieldableError>;
|
|
9998
10032
|
declare class ReactDoctorError extends ReactDoctorError_base {
|
|
9999
10033
|
get message(): string;
|