react-doctor 0.0.47 → 0.1.0

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 CHANGED
@@ -21,6 +21,7 @@ interface Diagnostic {
21
21
  line: number;
22
22
  column: number;
23
23
  category: string;
24
+ suppressionHint?: string;
24
25
  }
25
26
  interface ScoreResult {
26
27
  score: number;
@@ -56,9 +57,14 @@ interface DiffInfo {
56
57
  changedFiles: string[];
57
58
  isCurrentChanges?: boolean;
58
59
  }
60
+ interface ReactDoctorIgnoreOverride {
61
+ files: string[];
62
+ rules?: string[];
63
+ }
59
64
  interface ReactDoctorIgnoreConfig {
60
65
  rules?: string[];
61
66
  files?: string[];
67
+ overrides?: ReactDoctorIgnoreOverride[];
62
68
  }
63
69
  interface ReactDoctorConfig {
64
70
  ignore?: ReactDoctorIgnoreConfig;
@@ -71,8 +77,8 @@ interface ReactDoctorConfig {
71
77
  share?: boolean;
72
78
  textComponents?: string[];
73
79
  /**
74
- * Whether to respect inline `// eslint-disable*` / `// oxlint-disable*`
75
- * comments in source files. Default: `true`.
80
+ * Whether to respect inline `// eslint-disable*`, `// oxlint-disable*`,
81
+ * and `// react-doctor-disable*` comments in source files. Default: `true`.
76
82
  *
77
83
  * File-level ignores (`.gitignore`, `.eslintignore`, `.oxlintignore`,
78
84
  * `.prettierignore`, `.gitattributes` `linguist-vendored` /
@@ -85,6 +91,31 @@ interface ReactDoctorConfig {
85
91
  * of historical hide-comments.
86
92
  */
87
93
  respectInlineDisables?: boolean;
94
+ /**
95
+ * Whether to merge the user's existing JSON oxlint / eslint config
96
+ * (`.oxlintrc.json` or `.eslintrc.json`) into the generated scan via
97
+ * oxlint's `extends` field, so diagnostics from those rules count
98
+ * toward the react-doctor score. Default: `true`.
99
+ *
100
+ * Detection runs at the scanned directory and walks up to the
101
+ * nearest project boundary (`.git` directory or monorepo root).
102
+ * The first match wins, with `.oxlintrc.json` preferred over
103
+ * `.eslintrc.json`.
104
+ *
105
+ * Only JSON-format configs are supported because oxlint's `extends`
106
+ * cannot evaluate JS/TS configs. Flat configs (`eslint.config.js`),
107
+ * legacy JS configs (`.eslintrc.js`), and TypeScript oxlint configs
108
+ * (`oxlint.config.ts`) are silently skipped.
109
+ *
110
+ * Category-level enables in the user's config (`"categories": { ... }`)
111
+ * are NOT honored — react-doctor explicitly disables every oxlint
112
+ * category to keep the scan scoped to its curated rule surface, and
113
+ * local config wins over `extends`. Use rule-level severities to
114
+ * fold rules into the score.
115
+ *
116
+ * Set to `false` to scan only react-doctor's curated rule set.
117
+ */
118
+ adoptExistingLintConfig?: boolean;
88
119
  }
89
120
  type JsonReportMode = "full" | "diff" | "staged";
90
121
  interface JsonReportDiffInfo {