oxlint-plugin-react-doctor 0.9.17-dev.fe5ed09 → 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.
package/dist/core.d.ts CHANGED
@@ -1,7 +1,8 @@
1
- import { A as FrameworkToken, C as EsTreeNode, D as Capability, E as ScannedFile, O as CapabilityQuery, S as RuleContext, T as ScanFinding, _ as RuleExecution, a as shouldReadSecurityScanContent, b as RuleVisitors, c as UNBOUNDED_CROSS_FILE_RULE_IDS, d as CROSS_FILE_RULE_IDS, f as MOTION_LIBRARY_PACKAGES, g as Rule, h as OxlintRuleSeverity, i as classifySecurityScanFile, k as FRAMEWORK_TOKENS, l as collectCrossFileDependencyProbes, m as REACT_COMPILER_RULES, n as REACT_NATIVE_DEPENDENCY_PREFIXES, o as resetFilesystemCaches, p as EXTERNAL_RULES, r as isReactNativeDependencyName, s as CROSS_FILE_DEPENDENCY_COLLECTORS, t as REACT_NATIVE_DEPENDENCY_NAMES, u as CrossFileProbeTrace, v as RuleFramework, w as FileScan, y as RuleSeverity } from "./react-native-dependency-names-waW0owVD.js";
1
+ import { A as FRAMEWORK_TOKENS, C as RuleContext, D as ScannedFile, E as ScanFinding, O as Capability, T as FileScan, _ as RuleExecution, a as shouldReadSecurityScanContent, b as RuleSeverity, c as UNBOUNDED_CROSS_FILE_RULE_IDS, d as CROSS_FILE_RULE_IDS, f as MOTION_LIBRARY_PACKAGES, g as Rule, h as OxlintRuleSeverity, i as classifySecurityScanFile, j as FrameworkToken, k as CapabilityQuery, l as collectCrossFileDependencyProbes, m as REACT_COMPILER_RULES, n as REACT_NATIVE_DEPENDENCY_PREFIXES, o as resetFilesystemCaches, p as EXTERNAL_RULES, r as isReactNativeDependencyName, s as CROSS_FILE_DEPENDENCY_COLLECTORS, t as REACT_NATIVE_DEPENDENCY_NAMES, u as CrossFileProbeTrace, v as RuleFramework, w as EsTreeNode, x as RuleVisitors } from "./react-native-dependency-names-HniFQ29a.js";
2
2
 
3
3
  //#region src/plugin/utils/core-rule-metadata.d.ts
4
4
  interface CoreRuleMetadata {
5
+ readonly diffScope?: Rule["diffScope"];
5
6
  readonly id: string;
6
7
  readonly title?: string;
7
8
  readonly severity: RuleSeverity;
@@ -35,6 +36,7 @@ declare const reactDoctorScanRules: readonly [{
35
36
  readonly framework: "global";
36
37
  readonly category: "Security";
37
38
  readonly tags: readonly string[];
39
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
38
40
  readonly id: string;
39
41
  readonly title?: string;
40
42
  readonly severity: RuleSeverity;
@@ -60,6 +62,7 @@ declare const reactDoctorScanRules: readonly [{
60
62
  readonly framework: "global";
61
63
  readonly category: "Security";
62
64
  readonly tags: readonly string[];
65
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
63
66
  readonly id: string;
64
67
  readonly title?: string;
65
68
  readonly severity: RuleSeverity;
@@ -85,6 +88,7 @@ declare const reactDoctorScanRules: readonly [{
85
88
  readonly framework: "global";
86
89
  readonly category: "Security";
87
90
  readonly tags: readonly string[];
91
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
88
92
  readonly id: string;
89
93
  readonly title?: string;
90
94
  readonly severity: RuleSeverity;
@@ -110,6 +114,7 @@ declare const reactDoctorScanRules: readonly [{
110
114
  readonly framework: "global";
111
115
  readonly category: "Security";
112
116
  readonly tags: readonly string[];
117
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
113
118
  readonly id: string;
114
119
  readonly title?: string;
115
120
  readonly severity: RuleSeverity;
@@ -135,6 +140,7 @@ declare const reactDoctorScanRules: readonly [{
135
140
  readonly framework: "global";
136
141
  readonly category: "Security";
137
142
  readonly tags: readonly string[];
143
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
138
144
  readonly id: string;
139
145
  readonly title?: string;
140
146
  readonly severity: RuleSeverity;
@@ -160,6 +166,7 @@ declare const reactDoctorScanRules: readonly [{
160
166
  readonly framework: "global";
161
167
  readonly category: "Security";
162
168
  readonly tags: readonly string[];
169
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
163
170
  readonly id: string;
164
171
  readonly title?: string;
165
172
  readonly severity: RuleSeverity;
@@ -185,6 +192,7 @@ declare const reactDoctorScanRules: readonly [{
185
192
  readonly framework: "global";
186
193
  readonly category: "Security";
187
194
  readonly tags: readonly string[];
195
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
188
196
  readonly id: string;
189
197
  readonly title?: string;
190
198
  readonly severity: RuleSeverity;
@@ -210,6 +218,7 @@ declare const reactDoctorScanRules: readonly [{
210
218
  readonly framework: "global";
211
219
  readonly category: "Security";
212
220
  readonly tags: readonly string[];
221
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
213
222
  readonly id: string;
214
223
  readonly title?: string;
215
224
  readonly severity: RuleSeverity;
@@ -235,6 +244,7 @@ declare const reactDoctorScanRules: readonly [{
235
244
  readonly framework: "global";
236
245
  readonly category: "Security";
237
246
  readonly tags: readonly string[];
247
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
238
248
  readonly id: string;
239
249
  readonly title?: string;
240
250
  readonly severity: RuleSeverity;
@@ -260,6 +270,7 @@ declare const reactDoctorScanRules: readonly [{
260
270
  readonly framework: "global";
261
271
  readonly category: "Security";
262
272
  readonly tags: readonly string[];
273
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
263
274
  readonly id: string;
264
275
  readonly title?: string;
265
276
  readonly severity: RuleSeverity;
@@ -285,6 +296,7 @@ declare const reactDoctorScanRules: readonly [{
285
296
  readonly framework: "global";
286
297
  readonly category: "Security";
287
298
  readonly tags: readonly string[];
299
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
288
300
  readonly id: string;
289
301
  readonly title?: string;
290
302
  readonly severity: RuleSeverity;
@@ -310,6 +322,7 @@ declare const reactDoctorScanRules: readonly [{
310
322
  readonly framework: "global";
311
323
  readonly category: "Security";
312
324
  readonly tags: readonly string[];
325
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
313
326
  readonly id: string;
314
327
  readonly title?: string;
315
328
  readonly severity: RuleSeverity;
@@ -335,6 +348,7 @@ declare const reactDoctorScanRules: readonly [{
335
348
  readonly framework: "global";
336
349
  readonly category: "Security";
337
350
  readonly tags: readonly string[];
351
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
338
352
  readonly id: string;
339
353
  readonly title?: string;
340
354
  readonly severity: RuleSeverity;
@@ -360,6 +374,7 @@ declare const reactDoctorScanRules: readonly [{
360
374
  readonly framework: "global";
361
375
  readonly category: "Security";
362
376
  readonly tags: readonly string[];
377
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
363
378
  readonly id: string;
364
379
  readonly title?: string;
365
380
  readonly severity: RuleSeverity;
@@ -385,6 +400,7 @@ declare const reactDoctorScanRules: readonly [{
385
400
  readonly framework: "global";
386
401
  readonly category: "Security";
387
402
  readonly tags: readonly string[];
403
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
388
404
  readonly id: string;
389
405
  readonly title?: string;
390
406
  readonly severity: RuleSeverity;
@@ -410,6 +426,7 @@ declare const reactDoctorScanRules: readonly [{
410
426
  readonly framework: "global";
411
427
  readonly category: "Security";
412
428
  readonly tags: readonly string[];
429
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
413
430
  readonly id: string;
414
431
  readonly title?: string;
415
432
  readonly severity: RuleSeverity;
@@ -435,6 +452,7 @@ declare const reactDoctorScanRules: readonly [{
435
452
  readonly framework: "global";
436
453
  readonly category: "Security";
437
454
  readonly tags: readonly string[];
455
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
438
456
  readonly id: string;
439
457
  readonly title?: string;
440
458
  readonly severity: RuleSeverity;
@@ -460,6 +478,7 @@ declare const reactDoctorScanRules: readonly [{
460
478
  readonly framework: "global";
461
479
  readonly category: "Security";
462
480
  readonly tags: readonly string[];
481
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
463
482
  readonly id: string;
464
483
  readonly title?: string;
465
484
  readonly severity: RuleSeverity;
@@ -485,6 +504,7 @@ declare const reactDoctorScanRules: readonly [{
485
504
  readonly framework: "global";
486
505
  readonly category: "Security";
487
506
  readonly tags: readonly string[];
507
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
488
508
  readonly id: string;
489
509
  readonly title?: string;
490
510
  readonly severity: RuleSeverity;
@@ -510,6 +530,7 @@ declare const reactDoctorScanRules: readonly [{
510
530
  readonly framework: "global";
511
531
  readonly category: "Security";
512
532
  readonly tags: readonly string[];
533
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
513
534
  readonly id: string;
514
535
  readonly title?: string;
515
536
  readonly severity: RuleSeverity;
@@ -535,6 +556,7 @@ declare const reactDoctorScanRules: readonly [{
535
556
  readonly framework: "global";
536
557
  readonly category: "Security";
537
558
  readonly tags: readonly string[];
559
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
538
560
  readonly id: string;
539
561
  readonly title?: string;
540
562
  readonly severity: RuleSeverity;
@@ -560,6 +582,7 @@ declare const reactDoctorScanRules: readonly [{
560
582
  readonly framework: "global";
561
583
  readonly category: "Security";
562
584
  readonly tags: readonly string[];
585
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
563
586
  readonly id: string;
564
587
  readonly title?: string;
565
588
  readonly severity: RuleSeverity;
@@ -585,6 +608,7 @@ declare const reactDoctorScanRules: readonly [{
585
608
  readonly framework: "global";
586
609
  readonly category: "Security";
587
610
  readonly tags: readonly string[];
611
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
588
612
  readonly id: string;
589
613
  readonly title?: string;
590
614
  readonly severity: RuleSeverity;
@@ -610,6 +634,7 @@ declare const reactDoctorScanRules: readonly [{
610
634
  readonly framework: "global";
611
635
  readonly category: "Security";
612
636
  readonly tags: readonly string[];
637
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
613
638
  readonly id: string;
614
639
  readonly title?: string;
615
640
  readonly severity: RuleSeverity;
@@ -635,6 +660,7 @@ declare const reactDoctorScanRules: readonly [{
635
660
  readonly framework: "global";
636
661
  readonly category: "Security";
637
662
  readonly tags: readonly string[];
663
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
638
664
  readonly id: string;
639
665
  readonly title?: string;
640
666
  readonly severity: RuleSeverity;
@@ -660,6 +686,7 @@ declare const reactDoctorScanRules: readonly [{
660
686
  readonly framework: "global";
661
687
  readonly category: "Security";
662
688
  readonly tags: readonly string[];
689
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
663
690
  readonly id: string;
664
691
  readonly title?: string;
665
692
  readonly severity: RuleSeverity;
@@ -685,6 +712,7 @@ declare const reactDoctorScanRules: readonly [{
685
712
  readonly framework: "global";
686
713
  readonly category: "Security";
687
714
  readonly tags: readonly string[];
715
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
688
716
  readonly id: string;
689
717
  readonly title?: string;
690
718
  readonly severity: RuleSeverity;
@@ -710,6 +738,7 @@ declare const reactDoctorScanRules: readonly [{
710
738
  readonly framework: "global";
711
739
  readonly category: "Security";
712
740
  readonly tags: readonly string[];
741
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
713
742
  readonly id: string;
714
743
  readonly title?: string;
715
744
  readonly severity: RuleSeverity;
@@ -735,6 +764,7 @@ declare const reactDoctorScanRules: readonly [{
735
764
  readonly framework: "global";
736
765
  readonly category: "Security";
737
766
  readonly tags: readonly string[];
767
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
738
768
  readonly id: string;
739
769
  readonly title?: string;
740
770
  readonly severity: RuleSeverity;
@@ -760,6 +790,7 @@ declare const reactDoctorScanRules: readonly [{
760
790
  readonly framework: "global";
761
791
  readonly category: "Security";
762
792
  readonly tags: readonly string[];
793
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
763
794
  readonly id: string;
764
795
  readonly title?: string;
765
796
  readonly severity: RuleSeverity;
@@ -785,6 +816,7 @@ declare const reactDoctorScanRules: readonly [{
785
816
  readonly framework: "global";
786
817
  readonly category: "Security";
787
818
  readonly tags: readonly string[];
819
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
788
820
  readonly id: string;
789
821
  readonly title?: string;
790
822
  readonly severity: RuleSeverity;
@@ -810,6 +842,7 @@ declare const reactDoctorScanRules: readonly [{
810
842
  readonly framework: "global";
811
843
  readonly category: "Security";
812
844
  readonly tags: readonly string[];
845
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
813
846
  readonly id: string;
814
847
  readonly title?: string;
815
848
  readonly severity: RuleSeverity;
@@ -835,6 +868,7 @@ declare const reactDoctorScanRules: readonly [{
835
868
  readonly framework: "global";
836
869
  readonly category: "Security";
837
870
  readonly tags: readonly string[];
871
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
838
872
  readonly id: string;
839
873
  readonly title?: string;
840
874
  readonly severity: RuleSeverity;
@@ -860,6 +894,7 @@ declare const reactDoctorScanRules: readonly [{
860
894
  readonly framework: "global";
861
895
  readonly category: "Security";
862
896
  readonly tags: readonly string[];
897
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
863
898
  readonly id: string;
864
899
  readonly title?: string;
865
900
  readonly severity: RuleSeverity;
@@ -885,6 +920,7 @@ declare const reactDoctorScanRules: readonly [{
885
920
  readonly framework: "global";
886
921
  readonly category: "Security";
887
922
  readonly tags: readonly string[];
923
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
888
924
  readonly id: string;
889
925
  readonly title?: string;
890
926
  readonly severity: RuleSeverity;
@@ -910,6 +946,7 @@ declare const reactDoctorScanRules: readonly [{
910
946
  readonly framework: "global";
911
947
  readonly category: "Security";
912
948
  readonly tags: readonly string[];
949
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
913
950
  readonly id: string;
914
951
  readonly title?: string;
915
952
  readonly severity: RuleSeverity;
@@ -935,6 +972,7 @@ declare const reactDoctorScanRules: readonly [{
935
972
  readonly framework: "global";
936
973
  readonly category: "Security";
937
974
  readonly tags: readonly string[];
975
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
938
976
  readonly id: string;
939
977
  readonly title?: string;
940
978
  readonly severity: RuleSeverity;
@@ -960,6 +998,7 @@ declare const reactDoctorScanRules: readonly [{
960
998
  readonly framework: "global";
961
999
  readonly category: "Security";
962
1000
  readonly tags: readonly string[];
1001
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
963
1002
  readonly id: string;
964
1003
  readonly title?: string;
965
1004
  readonly severity: RuleSeverity;
@@ -985,6 +1024,7 @@ declare const reactDoctorScanRules: readonly [{
985
1024
  readonly framework: "global";
986
1025
  readonly category: "Security";
987
1026
  readonly tags: readonly string[];
1027
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
988
1028
  readonly id: string;
989
1029
  readonly title?: string;
990
1030
  readonly severity: RuleSeverity;
@@ -1010,6 +1050,7 @@ declare const reactDoctorScanRules: readonly [{
1010
1050
  readonly framework: "global";
1011
1051
  readonly category: "Security";
1012
1052
  readonly tags: readonly string[];
1053
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
1013
1054
  readonly id: string;
1014
1055
  readonly title?: string;
1015
1056
  readonly severity: RuleSeverity;
@@ -1035,6 +1076,7 @@ declare const reactDoctorScanRules: readonly [{
1035
1076
  readonly framework: "global";
1036
1077
  readonly category: "Security";
1037
1078
  readonly tags: readonly string[];
1079
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
1038
1080
  readonly id: string;
1039
1081
  readonly title?: string;
1040
1082
  readonly severity: RuleSeverity;
@@ -1060,6 +1102,7 @@ declare const reactDoctorScanRules: readonly [{
1060
1102
  readonly framework: "global";
1061
1103
  readonly category: "Security";
1062
1104
  readonly tags: readonly string[];
1105
+ readonly diffScope?: "line" | "jsx-element" | "function" | "file";
1063
1106
  readonly id: string;
1064
1107
  readonly title?: string;
1065
1108
  readonly severity: RuleSeverity;
@@ -1078,6 +1121,27 @@ declare const reactDoctorScanRules: readonly [{
1078
1121
  };
1079
1122
  }];
1080
1123
  //#endregion
1124
+ //#region src/plugin/utils/atomic-write-file.d.ts
1125
+ declare const atomicWriteFile: (filePath: string, contents: string) => void;
1126
+ //#endregion
1127
+ //#region src/plugin/utils/get-diagnostic-context-path.d.ts
1128
+ interface DiagnosticContextIdentity {
1129
+ readonly filename: string;
1130
+ readonly rule: string;
1131
+ readonly offset: number;
1132
+ readonly message: string;
1133
+ }
1134
+ interface DiagnosticContextPathInput extends DiagnosticContextIdentity {
1135
+ readonly directory: string;
1136
+ }
1137
+ declare const getDiagnosticContextPath: (input: DiagnosticContextPathInput) => string;
1138
+ //#endregion
1139
+ //#region src/plugin/utils/diagnostic-context-range.d.ts
1140
+ interface DiagnosticContextRange {
1141
+ readonly offset: number;
1142
+ readonly length: number;
1143
+ }
1144
+ //#endregion
1081
1145
  //#region src/core.d.ts
1082
1146
  declare const REACT_DOCTOR_RULES: readonly CoreRuleRegistryEntry[];
1083
1147
  declare const REACT_DOCTOR_PROJECT_RULES: CoreRuleRegistryEntry[];
@@ -1086,5 +1150,5 @@ declare const REACT_DOCTOR_RULE_REGISTRY: Readonly<Record<string, CoreRuleMetada
1086
1150
  declare const ALL_REACT_DOCTOR_RULE_KEYS: ReadonlySet<string>;
1087
1151
  declare const FRAMEWORK_SPECIFIC_RULE_KEYS: ReadonlySet<string>;
1088
1152
  //#endregion
1089
- export { ALL_REACT_DOCTOR_RULE_KEYS, CROSS_FILE_DEPENDENCY_COLLECTORS, CROSS_FILE_RULE_IDS, type Capability, type CapabilityQuery, type CoreRuleMetadata, type CrossFileProbeTrace, EXTERNAL_RULES, type EsTreeNode, FRAMEWORK_SPECIFIC_RULE_KEYS, FRAMEWORK_TOKENS, type FileScan, type FrameworkToken, MOTION_LIBRARY_PACKAGES, type OxlintRuleSeverity, REACT_COMPILER_RULES, REACT_DOCTOR_OPT_IN_PROJECT_RULE_IDS, REACT_DOCTOR_PROJECT_RULES, REACT_DOCTOR_RULES, REACT_DOCTOR_RULE_REGISTRY, reactDoctorScanRules as REACT_DOCTOR_SCAN_RULES, REACT_NATIVE_DEPENDENCY_NAMES, REACT_NATIVE_DEPENDENCY_PREFIXES, type Rule, type RuleExecution, type RuleFramework, type RuleSeverity, type ScanFinding, type ScannedFile, UNBOUNDED_CROSS_FILE_RULE_IDS, classifySecurityScanFile, collectCrossFileDependencyProbes, isReactNativeDependencyName, resetFilesystemCaches as resetManifestCaches, shouldReadSecurityScanContent };
1153
+ export { ALL_REACT_DOCTOR_RULE_KEYS, CROSS_FILE_DEPENDENCY_COLLECTORS, CROSS_FILE_RULE_IDS, type Capability, type CapabilityQuery, type CoreRuleMetadata, type CrossFileProbeTrace, type DiagnosticContextIdentity, type DiagnosticContextRange, EXTERNAL_RULES, type EsTreeNode, FRAMEWORK_SPECIFIC_RULE_KEYS, FRAMEWORK_TOKENS, type FileScan, type FrameworkToken, MOTION_LIBRARY_PACKAGES, type OxlintRuleSeverity, REACT_COMPILER_RULES, REACT_DOCTOR_OPT_IN_PROJECT_RULE_IDS, REACT_DOCTOR_PROJECT_RULES, REACT_DOCTOR_RULES, REACT_DOCTOR_RULE_REGISTRY, reactDoctorScanRules as REACT_DOCTOR_SCAN_RULES, REACT_NATIVE_DEPENDENCY_NAMES, REACT_NATIVE_DEPENDENCY_PREFIXES, type Rule, type RuleExecution, type RuleFramework, type RuleSeverity, type ScanFinding, type ScannedFile, UNBOUNDED_CROSS_FILE_RULE_IDS, atomicWriteFile, classifySecurityScanFile, collectCrossFileDependencyProbes, getDiagnosticContextPath, isReactNativeDependencyName, resetFilesystemCaches as resetManifestCaches, shouldReadSecurityScanContent };
1090
1154
  //# sourceMappingURL=core.d.ts.map