react-doctor 0.4.2-dev.93d4eec → 0.4.2-dev.a254414
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/cli.js +1915 -29
- package/dist/index.d.ts +46 -0
- package/dist/index.js +1756 -15
- package/dist/lsp.js +1746 -13
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -118,10 +118,56 @@ interface SurfaceControls {
|
|
|
118
118
|
/** Fully-qualified rule keys to exclude from this surface. */
|
|
119
119
|
excludeRules?: string[];
|
|
120
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* Configuration for the Socket.dev supply-chain score check (the
|
|
123
|
+
* `SupplyChain` service). Runs by default; set `enabled: false` to opt out
|
|
124
|
+
* (it performs one network request per direct dependency).
|
|
125
|
+
*
|
|
126
|
+
* Mirrors how Socket Firewall's free tier (`sfw`) works: each direct
|
|
127
|
+
* dependency's PURL is looked up against Socket's keyless
|
|
128
|
+
* `firewall-api.socket.dev/purl/<purl>` endpoint, which returns a
|
|
129
|
+
* supply-chain score (0–100 once normalized). A dependency scoring below
|
|
130
|
+
* `minScore` produces a diagnostic; at the default `severity: "error"` it
|
|
131
|
+
* fails the scan (non-zero CI exit), the same way an error-severity lint
|
|
132
|
+
* finding does.
|
|
133
|
+
*/
|
|
134
|
+
interface SupplyChainConfig {
|
|
135
|
+
/**
|
|
136
|
+
* Whether to run the Socket supply-chain score check. Default: `true`.
|
|
137
|
+
* Set to `false` to opt out — the check performs one network request per
|
|
138
|
+
* direct dependency. It is always skipped in `--diff` / `--staged` mode
|
|
139
|
+
* and in editor scans regardless of this setting.
|
|
140
|
+
*/
|
|
141
|
+
enabled?: boolean;
|
|
142
|
+
/**
|
|
143
|
+
* Minimum acceptable Socket score on a 0–100 scale. A direct dependency
|
|
144
|
+
* whose Socket `overall` score is below this is flagged. Default: `50`.
|
|
145
|
+
* Values outside `0..100` are clamped.
|
|
146
|
+
*/
|
|
147
|
+
minScore?: number;
|
|
148
|
+
/**
|
|
149
|
+
* Severity for a below-threshold dependency. `"error"` (default) fails
|
|
150
|
+
* the scan at the standard `blocking: "error"` gate; `"warning"` keeps
|
|
151
|
+
* the finding advisory.
|
|
152
|
+
*/
|
|
153
|
+
severity?: "error" | "warning";
|
|
154
|
+
/**
|
|
155
|
+
* Whether to score `devDependencies` in addition to `dependencies`.
|
|
156
|
+
* Default: `true`.
|
|
157
|
+
*/
|
|
158
|
+
includeDevDependencies?: boolean;
|
|
159
|
+
}
|
|
121
160
|
interface ReactDoctorConfig {
|
|
122
161
|
$schema?: string;
|
|
123
162
|
ignore?: ReactDoctorIgnoreConfig;
|
|
124
163
|
lint?: boolean;
|
|
164
|
+
/**
|
|
165
|
+
* Socket.dev supply-chain score gate. Runs by default; set
|
|
166
|
+
* `supplyChain: { enabled: false }` to opt out. See {@link SupplyChainConfig}.
|
|
167
|
+
* Every direct dependency is scored against Socket's free PURL endpoint and
|
|
168
|
+
* a low score fails the scan (at the default `severity: "error"`).
|
|
169
|
+
*/
|
|
170
|
+
supplyChain?: SupplyChainConfig;
|
|
125
171
|
/**
|
|
126
172
|
* Whether to run dead-code analysis (via `deslop-js`) alongside lint.
|
|
127
173
|
* Reports unused files, unused exports, unused dependencies, and
|