oxlint-plugin-react-doctor 0.7.4-dev.b686594 → 0.7.4-dev.d4f2209
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/index.d.ts +231 -1
- package/dist/index.js +3400 -1066
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -100,7 +100,7 @@ interface RuleContext extends Omit<BaseRuleContext, "getFilename"> {
|
|
|
100
100
|
//#region src/plugin/utils/capability.d.ts
|
|
101
101
|
declare const FRAMEWORK_TOKENS: readonly ["nextjs", "vite", "cra", "remix", "gatsby", "expo", "react-native", "tanstack-start", "preact", "unknown"];
|
|
102
102
|
type FrameworkToken = (typeof FRAMEWORK_TOKENS)[number];
|
|
103
|
-
type Capability = FrameworkToken | "react" | "pure-preact" | "react-native" | "server-actions" | "client-only" | "nextjs:static-export" | "nextjs:15" | "tailwind" | "tailwind:3.4" | "zod" | "zod:4" | "typescript" | "react-compiler" | "tanstack-query" | "pre-es2023" | `react:${number}` | `preact:${number}`;
|
|
103
|
+
type Capability = FrameworkToken | "react" | "pure-preact" | "react-native" | "server-actions" | "ssr" | "client-only" | "nextjs:static-export" | "nextjs:15" | "tailwind" | "tailwind:3.4" | "zod" | "zod:4" | "typescript" | "react-compiler" | "tanstack-query" | "pre-es2023" | `react:${number}` | `preact:${number}`;
|
|
104
104
|
type CapabilityQuery = (capability: Capability) => boolean;
|
|
105
105
|
//#endregion
|
|
106
106
|
//#region src/plugin/utils/file-scan.d.ts
|
|
@@ -4399,6 +4399,29 @@ declare const REACT_DOCTOR_RULES: readonly [{
|
|
|
4399
4399
|
readonly recommendationFor?: (hasCapability: CapabilityQuery) => string | undefined;
|
|
4400
4400
|
readonly create: (context: RuleContext) => RuleVisitors;
|
|
4401
4401
|
};
|
|
4402
|
+
}, {
|
|
4403
|
+
readonly key: "react-doctor/no-hydration-branch-on-browser-global";
|
|
4404
|
+
readonly id: "no-hydration-branch-on-browser-global";
|
|
4405
|
+
readonly source: "react-doctor";
|
|
4406
|
+
readonly originallyExternal: false;
|
|
4407
|
+
readonly rule: {
|
|
4408
|
+
readonly framework: "global";
|
|
4409
|
+
readonly category: "Bugs";
|
|
4410
|
+
readonly requires: readonly Capability[];
|
|
4411
|
+
readonly id: string;
|
|
4412
|
+
readonly title?: string;
|
|
4413
|
+
readonly severity: RuleSeverity;
|
|
4414
|
+
readonly disabledWhen?: ReadonlyArray<Capability>;
|
|
4415
|
+
readonly tags?: ReadonlyArray<string>;
|
|
4416
|
+
readonly matchByOccurrence?: boolean;
|
|
4417
|
+
readonly defaultEnabled?: boolean;
|
|
4418
|
+
readonly lifecycle?: "retired";
|
|
4419
|
+
readonly scan?: FileScan;
|
|
4420
|
+
readonly committedFilesOnly?: boolean;
|
|
4421
|
+
readonly recommendation?: string;
|
|
4422
|
+
readonly recommendationFor?: (hasCapability: CapabilityQuery) => string | undefined;
|
|
4423
|
+
readonly create: (context: RuleContext) => RuleVisitors;
|
|
4424
|
+
};
|
|
4402
4425
|
}, {
|
|
4403
4426
|
readonly key: "react-doctor/no-img-lazy-with-high-fetchpriority";
|
|
4404
4427
|
readonly id: "no-img-lazy-with-high-fetchpriority";
|
|
@@ -4422,6 +4445,29 @@ declare const REACT_DOCTOR_RULES: readonly [{
|
|
|
4422
4445
|
readonly recommendationFor?: (hasCapability: CapabilityQuery) => string | undefined;
|
|
4423
4446
|
readonly create: (context: RuleContext) => RuleVisitors;
|
|
4424
4447
|
};
|
|
4448
|
+
}, {
|
|
4449
|
+
readonly key: "react-doctor/no-impure-state-updater";
|
|
4450
|
+
readonly id: "no-impure-state-updater";
|
|
4451
|
+
readonly source: "react-doctor";
|
|
4452
|
+
readonly originallyExternal: false;
|
|
4453
|
+
readonly rule: {
|
|
4454
|
+
readonly framework: "global";
|
|
4455
|
+
readonly category: "Bugs";
|
|
4456
|
+
readonly requires: readonly Capability[];
|
|
4457
|
+
readonly id: string;
|
|
4458
|
+
readonly title?: string;
|
|
4459
|
+
readonly severity: RuleSeverity;
|
|
4460
|
+
readonly disabledWhen?: ReadonlyArray<Capability>;
|
|
4461
|
+
readonly tags?: ReadonlyArray<string>;
|
|
4462
|
+
readonly matchByOccurrence?: boolean;
|
|
4463
|
+
readonly defaultEnabled?: boolean;
|
|
4464
|
+
readonly lifecycle?: "retired";
|
|
4465
|
+
readonly scan?: FileScan;
|
|
4466
|
+
readonly committedFilesOnly?: boolean;
|
|
4467
|
+
readonly recommendation?: string;
|
|
4468
|
+
readonly recommendationFor?: (hasCapability: CapabilityQuery) => string | undefined;
|
|
4469
|
+
readonly create: (context: RuleContext) => RuleVisitors;
|
|
4470
|
+
};
|
|
4425
4471
|
}, {
|
|
4426
4472
|
readonly key: "react-doctor/no-indeterminate-attribute";
|
|
4427
4473
|
readonly id: "no-indeterminate-attribute";
|
|
@@ -5250,6 +5296,29 @@ declare const REACT_DOCTOR_RULES: readonly [{
|
|
|
5250
5296
|
readonly recommendationFor?: (hasCapability: CapabilityQuery) => string | undefined;
|
|
5251
5297
|
readonly create: (context: RuleContext) => RuleVisitors;
|
|
5252
5298
|
};
|
|
5299
|
+
}, {
|
|
5300
|
+
readonly key: "react-doctor/no-prop-callback-in-render";
|
|
5301
|
+
readonly id: "no-prop-callback-in-render";
|
|
5302
|
+
readonly source: "react-doctor";
|
|
5303
|
+
readonly originallyExternal: false;
|
|
5304
|
+
readonly rule: {
|
|
5305
|
+
readonly framework: "global";
|
|
5306
|
+
readonly category: "Bugs";
|
|
5307
|
+
readonly requires: readonly Capability[];
|
|
5308
|
+
readonly id: string;
|
|
5309
|
+
readonly title?: string;
|
|
5310
|
+
readonly severity: RuleSeverity;
|
|
5311
|
+
readonly disabledWhen?: ReadonlyArray<Capability>;
|
|
5312
|
+
readonly tags?: ReadonlyArray<string>;
|
|
5313
|
+
readonly matchByOccurrence?: boolean;
|
|
5314
|
+
readonly defaultEnabled?: boolean;
|
|
5315
|
+
readonly lifecycle?: "retired";
|
|
5316
|
+
readonly scan?: FileScan;
|
|
5317
|
+
readonly committedFilesOnly?: boolean;
|
|
5318
|
+
readonly recommendation?: string;
|
|
5319
|
+
readonly recommendationFor?: (hasCapability: CapabilityQuery) => string | undefined;
|
|
5320
|
+
readonly create: (context: RuleContext) => RuleVisitors;
|
|
5321
|
+
};
|
|
5253
5322
|
}, {
|
|
5254
5323
|
readonly key: "react-doctor/no-prop-types";
|
|
5255
5324
|
readonly id: "no-prop-types";
|
|
@@ -5434,6 +5503,29 @@ declare const REACT_DOCTOR_RULES: readonly [{
|
|
|
5434
5503
|
readonly recommendationFor?: (hasCapability: CapabilityQuery) => string | undefined;
|
|
5435
5504
|
readonly create: (context: RuleContext) => RuleVisitors;
|
|
5436
5505
|
};
|
|
5506
|
+
}, {
|
|
5507
|
+
readonly key: "react-doctor/no-ref-current-in-render";
|
|
5508
|
+
readonly id: "no-ref-current-in-render";
|
|
5509
|
+
readonly source: "react-doctor";
|
|
5510
|
+
readonly originallyExternal: false;
|
|
5511
|
+
readonly rule: {
|
|
5512
|
+
readonly framework: "global";
|
|
5513
|
+
readonly category: "Bugs";
|
|
5514
|
+
readonly requires: readonly Capability[];
|
|
5515
|
+
readonly id: string;
|
|
5516
|
+
readonly title?: string;
|
|
5517
|
+
readonly severity: RuleSeverity;
|
|
5518
|
+
readonly disabledWhen?: ReadonlyArray<Capability>;
|
|
5519
|
+
readonly tags?: ReadonlyArray<string>;
|
|
5520
|
+
readonly matchByOccurrence?: boolean;
|
|
5521
|
+
readonly defaultEnabled?: boolean;
|
|
5522
|
+
readonly lifecycle?: "retired";
|
|
5523
|
+
readonly scan?: FileScan;
|
|
5524
|
+
readonly committedFilesOnly?: boolean;
|
|
5525
|
+
readonly recommendation?: string;
|
|
5526
|
+
readonly recommendationFor?: (hasCapability: CapabilityQuery) => string | undefined;
|
|
5527
|
+
readonly create: (context: RuleContext) => RuleVisitors;
|
|
5528
|
+
};
|
|
5437
5529
|
}, {
|
|
5438
5530
|
readonly key: "react-doctor/no-render-in-render";
|
|
5439
5531
|
readonly id: "no-render-in-render";
|
|
@@ -5917,6 +6009,29 @@ declare const REACT_DOCTOR_RULES: readonly [{
|
|
|
5917
6009
|
readonly recommendationFor?: (hasCapability: CapabilityQuery) => string | undefined;
|
|
5918
6010
|
readonly create: (context: RuleContext) => RuleVisitors;
|
|
5919
6011
|
};
|
|
6012
|
+
}, {
|
|
6013
|
+
readonly key: "react-doctor/no-unguarded-browser-global-in-render-or-hook-init";
|
|
6014
|
+
readonly id: "no-unguarded-browser-global-in-render-or-hook-init";
|
|
6015
|
+
readonly source: "react-doctor";
|
|
6016
|
+
readonly originallyExternal: false;
|
|
6017
|
+
readonly rule: {
|
|
6018
|
+
readonly framework: "global";
|
|
6019
|
+
readonly category: "Bugs";
|
|
6020
|
+
readonly requires: readonly Capability[];
|
|
6021
|
+
readonly id: string;
|
|
6022
|
+
readonly title?: string;
|
|
6023
|
+
readonly severity: RuleSeverity;
|
|
6024
|
+
readonly disabledWhen?: ReadonlyArray<Capability>;
|
|
6025
|
+
readonly tags?: ReadonlyArray<string>;
|
|
6026
|
+
readonly matchByOccurrence?: boolean;
|
|
6027
|
+
readonly defaultEnabled?: boolean;
|
|
6028
|
+
readonly lifecycle?: "retired";
|
|
6029
|
+
readonly scan?: FileScan;
|
|
6030
|
+
readonly committedFilesOnly?: boolean;
|
|
6031
|
+
readonly recommendation?: string;
|
|
6032
|
+
readonly recommendationFor?: (hasCapability: CapabilityQuery) => string | undefined;
|
|
6033
|
+
readonly create: (context: RuleContext) => RuleVisitors;
|
|
6034
|
+
};
|
|
5920
6035
|
}, {
|
|
5921
6036
|
readonly key: "react-doctor/no-unknown-property";
|
|
5922
6037
|
readonly id: "no-unknown-property";
|
|
@@ -13550,6 +13665,29 @@ declare const RULES: readonly [{
|
|
|
13550
13665
|
readonly recommendationFor?: (hasCapability: CapabilityQuery) => string | undefined;
|
|
13551
13666
|
readonly create: (context: RuleContext) => RuleVisitors;
|
|
13552
13667
|
};
|
|
13668
|
+
}, {
|
|
13669
|
+
readonly key: "react-doctor/no-hydration-branch-on-browser-global";
|
|
13670
|
+
readonly id: "no-hydration-branch-on-browser-global";
|
|
13671
|
+
readonly source: "react-doctor";
|
|
13672
|
+
readonly originallyExternal: false;
|
|
13673
|
+
readonly rule: {
|
|
13674
|
+
readonly framework: "global";
|
|
13675
|
+
readonly category: "Bugs";
|
|
13676
|
+
readonly requires: readonly Capability[];
|
|
13677
|
+
readonly id: string;
|
|
13678
|
+
readonly title?: string;
|
|
13679
|
+
readonly severity: RuleSeverity;
|
|
13680
|
+
readonly disabledWhen?: ReadonlyArray<Capability>;
|
|
13681
|
+
readonly tags?: ReadonlyArray<string>;
|
|
13682
|
+
readonly matchByOccurrence?: boolean;
|
|
13683
|
+
readonly defaultEnabled?: boolean;
|
|
13684
|
+
readonly lifecycle?: "retired";
|
|
13685
|
+
readonly scan?: FileScan;
|
|
13686
|
+
readonly committedFilesOnly?: boolean;
|
|
13687
|
+
readonly recommendation?: string;
|
|
13688
|
+
readonly recommendationFor?: (hasCapability: CapabilityQuery) => string | undefined;
|
|
13689
|
+
readonly create: (context: RuleContext) => RuleVisitors;
|
|
13690
|
+
};
|
|
13553
13691
|
}, {
|
|
13554
13692
|
readonly key: "react-doctor/no-img-lazy-with-high-fetchpriority";
|
|
13555
13693
|
readonly id: "no-img-lazy-with-high-fetchpriority";
|
|
@@ -13573,6 +13711,29 @@ declare const RULES: readonly [{
|
|
|
13573
13711
|
readonly recommendationFor?: (hasCapability: CapabilityQuery) => string | undefined;
|
|
13574
13712
|
readonly create: (context: RuleContext) => RuleVisitors;
|
|
13575
13713
|
};
|
|
13714
|
+
}, {
|
|
13715
|
+
readonly key: "react-doctor/no-impure-state-updater";
|
|
13716
|
+
readonly id: "no-impure-state-updater";
|
|
13717
|
+
readonly source: "react-doctor";
|
|
13718
|
+
readonly originallyExternal: false;
|
|
13719
|
+
readonly rule: {
|
|
13720
|
+
readonly framework: "global";
|
|
13721
|
+
readonly category: "Bugs";
|
|
13722
|
+
readonly requires: readonly Capability[];
|
|
13723
|
+
readonly id: string;
|
|
13724
|
+
readonly title?: string;
|
|
13725
|
+
readonly severity: RuleSeverity;
|
|
13726
|
+
readonly disabledWhen?: ReadonlyArray<Capability>;
|
|
13727
|
+
readonly tags?: ReadonlyArray<string>;
|
|
13728
|
+
readonly matchByOccurrence?: boolean;
|
|
13729
|
+
readonly defaultEnabled?: boolean;
|
|
13730
|
+
readonly lifecycle?: "retired";
|
|
13731
|
+
readonly scan?: FileScan;
|
|
13732
|
+
readonly committedFilesOnly?: boolean;
|
|
13733
|
+
readonly recommendation?: string;
|
|
13734
|
+
readonly recommendationFor?: (hasCapability: CapabilityQuery) => string | undefined;
|
|
13735
|
+
readonly create: (context: RuleContext) => RuleVisitors;
|
|
13736
|
+
};
|
|
13576
13737
|
}, {
|
|
13577
13738
|
readonly key: "react-doctor/no-indeterminate-attribute";
|
|
13578
13739
|
readonly id: "no-indeterminate-attribute";
|
|
@@ -14401,6 +14562,29 @@ declare const RULES: readonly [{
|
|
|
14401
14562
|
readonly recommendationFor?: (hasCapability: CapabilityQuery) => string | undefined;
|
|
14402
14563
|
readonly create: (context: RuleContext) => RuleVisitors;
|
|
14403
14564
|
};
|
|
14565
|
+
}, {
|
|
14566
|
+
readonly key: "react-doctor/no-prop-callback-in-render";
|
|
14567
|
+
readonly id: "no-prop-callback-in-render";
|
|
14568
|
+
readonly source: "react-doctor";
|
|
14569
|
+
readonly originallyExternal: false;
|
|
14570
|
+
readonly rule: {
|
|
14571
|
+
readonly framework: "global";
|
|
14572
|
+
readonly category: "Bugs";
|
|
14573
|
+
readonly requires: readonly Capability[];
|
|
14574
|
+
readonly id: string;
|
|
14575
|
+
readonly title?: string;
|
|
14576
|
+
readonly severity: RuleSeverity;
|
|
14577
|
+
readonly disabledWhen?: ReadonlyArray<Capability>;
|
|
14578
|
+
readonly tags?: ReadonlyArray<string>;
|
|
14579
|
+
readonly matchByOccurrence?: boolean;
|
|
14580
|
+
readonly defaultEnabled?: boolean;
|
|
14581
|
+
readonly lifecycle?: "retired";
|
|
14582
|
+
readonly scan?: FileScan;
|
|
14583
|
+
readonly committedFilesOnly?: boolean;
|
|
14584
|
+
readonly recommendation?: string;
|
|
14585
|
+
readonly recommendationFor?: (hasCapability: CapabilityQuery) => string | undefined;
|
|
14586
|
+
readonly create: (context: RuleContext) => RuleVisitors;
|
|
14587
|
+
};
|
|
14404
14588
|
}, {
|
|
14405
14589
|
readonly key: "react-doctor/no-prop-types";
|
|
14406
14590
|
readonly id: "no-prop-types";
|
|
@@ -14585,6 +14769,29 @@ declare const RULES: readonly [{
|
|
|
14585
14769
|
readonly recommendationFor?: (hasCapability: CapabilityQuery) => string | undefined;
|
|
14586
14770
|
readonly create: (context: RuleContext) => RuleVisitors;
|
|
14587
14771
|
};
|
|
14772
|
+
}, {
|
|
14773
|
+
readonly key: "react-doctor/no-ref-current-in-render";
|
|
14774
|
+
readonly id: "no-ref-current-in-render";
|
|
14775
|
+
readonly source: "react-doctor";
|
|
14776
|
+
readonly originallyExternal: false;
|
|
14777
|
+
readonly rule: {
|
|
14778
|
+
readonly framework: "global";
|
|
14779
|
+
readonly category: "Bugs";
|
|
14780
|
+
readonly requires: readonly Capability[];
|
|
14781
|
+
readonly id: string;
|
|
14782
|
+
readonly title?: string;
|
|
14783
|
+
readonly severity: RuleSeverity;
|
|
14784
|
+
readonly disabledWhen?: ReadonlyArray<Capability>;
|
|
14785
|
+
readonly tags?: ReadonlyArray<string>;
|
|
14786
|
+
readonly matchByOccurrence?: boolean;
|
|
14787
|
+
readonly defaultEnabled?: boolean;
|
|
14788
|
+
readonly lifecycle?: "retired";
|
|
14789
|
+
readonly scan?: FileScan;
|
|
14790
|
+
readonly committedFilesOnly?: boolean;
|
|
14791
|
+
readonly recommendation?: string;
|
|
14792
|
+
readonly recommendationFor?: (hasCapability: CapabilityQuery) => string | undefined;
|
|
14793
|
+
readonly create: (context: RuleContext) => RuleVisitors;
|
|
14794
|
+
};
|
|
14588
14795
|
}, {
|
|
14589
14796
|
readonly key: "react-doctor/no-render-in-render";
|
|
14590
14797
|
readonly id: "no-render-in-render";
|
|
@@ -15068,6 +15275,29 @@ declare const RULES: readonly [{
|
|
|
15068
15275
|
readonly recommendationFor?: (hasCapability: CapabilityQuery) => string | undefined;
|
|
15069
15276
|
readonly create: (context: RuleContext) => RuleVisitors;
|
|
15070
15277
|
};
|
|
15278
|
+
}, {
|
|
15279
|
+
readonly key: "react-doctor/no-unguarded-browser-global-in-render-or-hook-init";
|
|
15280
|
+
readonly id: "no-unguarded-browser-global-in-render-or-hook-init";
|
|
15281
|
+
readonly source: "react-doctor";
|
|
15282
|
+
readonly originallyExternal: false;
|
|
15283
|
+
readonly rule: {
|
|
15284
|
+
readonly framework: "global";
|
|
15285
|
+
readonly category: "Bugs";
|
|
15286
|
+
readonly requires: readonly Capability[];
|
|
15287
|
+
readonly id: string;
|
|
15288
|
+
readonly title?: string;
|
|
15289
|
+
readonly severity: RuleSeverity;
|
|
15290
|
+
readonly disabledWhen?: ReadonlyArray<Capability>;
|
|
15291
|
+
readonly tags?: ReadonlyArray<string>;
|
|
15292
|
+
readonly matchByOccurrence?: boolean;
|
|
15293
|
+
readonly defaultEnabled?: boolean;
|
|
15294
|
+
readonly lifecycle?: "retired";
|
|
15295
|
+
readonly scan?: FileScan;
|
|
15296
|
+
readonly committedFilesOnly?: boolean;
|
|
15297
|
+
readonly recommendation?: string;
|
|
15298
|
+
readonly recommendationFor?: (hasCapability: CapabilityQuery) => string | undefined;
|
|
15299
|
+
readonly create: (context: RuleContext) => RuleVisitors;
|
|
15300
|
+
};
|
|
15071
15301
|
}, {
|
|
15072
15302
|
readonly key: "react-doctor/no-unknown-property";
|
|
15073
15303
|
readonly id: "no-unknown-property";
|