react-doctor 0.2.18-dev.f375dbb → 0.3.0-dev.915745e
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 +13 -1
- package/bin/react-doctor.js +9 -1
- package/dist/cli.js +1187 -468
- package/dist/index.d.ts +44 -1
- package/dist/index.js +334 -210
- package/dist/lsp.js +10741 -0
- package/package.json +9 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as Schema from "effect/Schema";
|
|
2
|
-
import fs from "node:fs";
|
|
3
2
|
import * as Cause from "effect/Cause";
|
|
4
3
|
//#region ../core/dist/index.d.ts
|
|
5
4
|
//#region src/types/config.d.ts
|
|
@@ -335,6 +334,25 @@ interface ReactDoctorConfig {
|
|
|
335
334
|
plugins?: string[];
|
|
336
335
|
} //#endregion
|
|
337
336
|
//#region src/types/diagnostic.d.ts
|
|
337
|
+
/**
|
|
338
|
+
* A secondary source location attached to a diagnostic (oxlint's
|
|
339
|
+
* non-primary labels). Editors render these as
|
|
340
|
+
* `Diagnostic.relatedInformation` so a user can jump from, say, a
|
|
341
|
+
* `no-derived-state` finding to the originating prop declaration.
|
|
342
|
+
* Positions mirror `Diagnostic` semantics: `line` / `column` are
|
|
343
|
+
* 1-indexed, and `offset` / `length` are UTF-8 byte spans from oxlint
|
|
344
|
+
* when available (preferred for precise ranges).
|
|
345
|
+
*/
|
|
346
|
+
interface DiagnosticRelatedLocation {
|
|
347
|
+
filePath: string;
|
|
348
|
+
line: number;
|
|
349
|
+
column: number;
|
|
350
|
+
offset?: number;
|
|
351
|
+
length?: number;
|
|
352
|
+
endLine?: number;
|
|
353
|
+
endColumn?: number;
|
|
354
|
+
message: string;
|
|
355
|
+
}
|
|
338
356
|
interface Diagnostic {
|
|
339
357
|
filePath: string;
|
|
340
358
|
plugin: string;
|
|
@@ -346,8 +364,24 @@ interface Diagnostic {
|
|
|
346
364
|
url?: string;
|
|
347
365
|
line: number;
|
|
348
366
|
column: number;
|
|
367
|
+
/**
|
|
368
|
+
* UTF-8 byte offset of the diagnostic's primary span start, straight
|
|
369
|
+
* from oxlint's label span. Optional because environment / dead-code
|
|
370
|
+
* diagnostics carry no source span. Editors (LSP) convert this into a
|
|
371
|
+
* precise range via the in-memory document; non-editor consumers can
|
|
372
|
+
* ignore it.
|
|
373
|
+
*/
|
|
374
|
+
offset?: number;
|
|
375
|
+
/** UTF-8 byte length of the primary span (pairs with `offset`). */
|
|
376
|
+
length?: number;
|
|
377
|
+
/** 1-indexed end line of the primary span, when derivable. */
|
|
378
|
+
endLine?: number;
|
|
379
|
+
/** 1-indexed end column of the primary span, when derivable. */
|
|
380
|
+
endColumn?: number;
|
|
349
381
|
category: string;
|
|
350
382
|
suppressionHint?: string;
|
|
383
|
+
/** Secondary source locations (oxlint's non-primary labels). */
|
|
384
|
+
relatedLocations?: DiagnosticRelatedLocation[];
|
|
351
385
|
}
|
|
352
386
|
//#endregion
|
|
353
387
|
//#region src/types/project-info.d.ts
|
|
@@ -407,6 +441,15 @@ interface ProjectInfo {
|
|
|
407
441
|
* rule) and the ported expo-doctor checks.
|
|
408
442
|
*/
|
|
409
443
|
expoVersion: string | null;
|
|
444
|
+
/**
|
|
445
|
+
* The declared `@shopify/flash-list` package version spec, or `null` when
|
|
446
|
+
* absent. FlashList v2 removed the need for `estimatedItemSize`, so this
|
|
447
|
+
* lets the RN list sizing rule stay scoped to versions where the prop is
|
|
448
|
+
* still useful.
|
|
449
|
+
*/
|
|
450
|
+
shopifyFlashListVersion: string | null;
|
|
451
|
+
/** Parsed major from `shopifyFlashListVersion`, or `null` when absent/unparseable. */
|
|
452
|
+
shopifyFlashListMajorVersion: number | null;
|
|
410
453
|
/**
|
|
411
454
|
* `true` when the project (or any of its workspace packages) declares
|
|
412
455
|
* `react-native-reanimated`. Lets diagnostics surface reanimated's
|