react-doctor 0.0.14 → 0.0.16

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.
@@ -0,0 +1,43 @@
1
+ //#region src/types.d.ts
2
+ type Framework = "nextjs" | "vite" | "cra" | "remix" | "gatsby" | "unknown";
3
+ interface ProjectInfo {
4
+ rootDirectory: string;
5
+ projectName: string;
6
+ reactVersion: string | null;
7
+ framework: Framework;
8
+ hasTypeScript: boolean;
9
+ hasReactCompiler: boolean;
10
+ sourceFileCount: number;
11
+ }
12
+ interface Diagnostic {
13
+ filePath: string;
14
+ plugin: string;
15
+ rule: string;
16
+ severity: "error" | "warning";
17
+ message: string;
18
+ help: string;
19
+ line: number;
20
+ column: number;
21
+ category: string;
22
+ weight?: number;
23
+ }
24
+ interface ScoreResult {
25
+ score: number;
26
+ label: string;
27
+ }
28
+ //#endregion
29
+ //#region src/index.d.ts
30
+ interface DiagnoseOptions {
31
+ lint?: boolean;
32
+ deadCode?: boolean;
33
+ }
34
+ interface DiagnoseResult {
35
+ diagnostics: Diagnostic[];
36
+ score: ScoreResult | null;
37
+ project: ProjectInfo;
38
+ elapsedMilliseconds: number;
39
+ }
40
+ declare const diagnose: (directory: string, options?: DiagnoseOptions) => Promise<DiagnoseResult>;
41
+ //#endregion
42
+ export { DiagnoseOptions, DiagnoseResult, type Diagnostic, type ProjectInfo, type ScoreResult, diagnose };
43
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/types.ts","../src/index.ts"],"mappings":";KAAY,SAAA;AAAA,UAEK,WAAA;EACf,aAAA;EACA,WAAA;EACA,YAAA;EACA,SAAA,EAAW,SAAA;EACX,aAAA;EACA,gBAAA;EACA,eAAA;AAAA;AAAA,UAiCe,UAAA;EACf,QAAA;EACA,MAAA;EACA,IAAA;EACA,QAAA;EACA,OAAA;EACA,IAAA;EACA,IAAA;EACA,MAAA;EACA,QAAA;EACA,MAAA;AAAA;AAAA,UA2Be,WAAA;EACf,KAAA;EACA,KAAA;AAAA;;;UCtEe,eAAA;EACf,IAAA;EACA,QAAA;AAAA;AAAA,UAGe,cAAA;EACf,WAAA,EAAa,UAAA;EACb,KAAA,EAAO,WAAA;EACP,OAAA,EAAS,WAAA;EACT,mBAAA;AAAA;AAAA,cAGW,QAAA,GACX,SAAA,UACA,OAAA,GAAS,eAAA,KACR,OAAA,CAAQ,cAAA"}