react-doctor 0.5.8-dev.f69f216 → 0.5.8-dev.fff9466
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 +110 -86
- package/dist/index.js +8 -2
- package/dist/lsp.js +8 -2
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f1523493-79d1-56b7-9f5f-78f1dd741d1e")}catch(e){}}();
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import * as NodeChildProcess from "node:child_process";
|
|
5
5
|
import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
|
|
@@ -40522,6 +40522,11 @@ const toCanonicalPath = (filePath) => {
|
|
|
40522
40522
|
};
|
|
40523
40523
|
const DEAD_CODE_PLUGIN = "deslop";
|
|
40524
40524
|
const DEAD_CODE_CATEGORY = "Maintainability";
|
|
40525
|
+
const REACT_DOCTOR_TOOLCHAIN_PACKAGES = new Set([
|
|
40526
|
+
"react-doctor",
|
|
40527
|
+
"eslint-plugin-react-doctor",
|
|
40528
|
+
"oxlint-plugin-react-doctor"
|
|
40529
|
+
]);
|
|
40525
40530
|
const DEAD_CODE_WORKER_SCRIPT = `
|
|
40526
40531
|
const inputChunks = [];
|
|
40527
40532
|
process.stdin.on("data", (chunk) => inputChunks.push(chunk));
|
|
@@ -40827,6 +40832,7 @@ const checkDeadCode = async (options) => {
|
|
|
40827
40832
|
});
|
|
40828
40833
|
}
|
|
40829
40834
|
for (const unusedDependency of result.unusedDependencies) {
|
|
40835
|
+
if (REACT_DOCTOR_TOOLCHAIN_PACKAGES.has(unusedDependency.name)) continue;
|
|
40830
40836
|
const label = unusedDependency.isDevDependency ? "devDependency" : "dependency";
|
|
40831
40837
|
diagnostics.push({
|
|
40832
40838
|
filePath: "package.json",
|
|
@@ -45103,7 +45109,7 @@ const makeNoopConsole = () => ({
|
|
|
45103
45109
|
});
|
|
45104
45110
|
//#endregion
|
|
45105
45111
|
//#region src/cli/utils/version.ts
|
|
45106
|
-
const VERSION = "0.5.8-dev.
|
|
45112
|
+
const VERSION = "0.5.8-dev.fff9466";
|
|
45107
45113
|
//#endregion
|
|
45108
45114
|
//#region src/cli/utils/json-mode.ts
|
|
45109
45115
|
let context = null;
|
|
@@ -45472,13 +45478,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
|
|
|
45472
45478
|
* uploads source-map artifacts under, so stack frames symbolicate. Honors the
|
|
45473
45479
|
* standard `SENTRY_RELEASE` override.
|
|
45474
45480
|
*/
|
|
45475
|
-
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.5.8-dev.
|
|
45481
|
+
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.5.8-dev.fff9466`;
|
|
45476
45482
|
/**
|
|
45477
45483
|
* Deployment environment shown in Sentry's environment filter. Defaults to
|
|
45478
45484
|
* `production` for tagged releases and `development` for dev/unbuilt versions,
|
|
45479
45485
|
* overridable via the standard `SENTRY_ENVIRONMENT` env var.
|
|
45480
45486
|
*/
|
|
45481
|
-
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.5.8-dev.
|
|
45487
|
+
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.5.8-dev.fff9466") ? "development" : "production");
|
|
45482
45488
|
/**
|
|
45483
45489
|
* Performance-tracing sample rate in `[0, 1]`. Reads `SENTRY_TRACES_SAMPLE_RATE`
|
|
45484
45490
|
* (set to `0` to disable tracing) and falls back to
|
|
@@ -52259,10 +52265,11 @@ const rememberInstallAgents = (agents, options = {}) => writePreference(INSTALL_
|
|
|
52259
52265
|
const CLAUDE_AGENT = "claude-code";
|
|
52260
52266
|
const CURSOR_AGENT = "cursor";
|
|
52261
52267
|
const CLAUDE_SETTINGS_RELATIVE_PATH = ".claude/settings.json";
|
|
52262
|
-
const CLAUDE_HOOK_RELATIVE_PATH = ".claude/hooks/react-doctor.
|
|
52263
|
-
const CLAUDE_HOOK_COMMAND = "
|
|
52268
|
+
const CLAUDE_HOOK_RELATIVE_PATH = ".claude/hooks/react-doctor.mjs";
|
|
52269
|
+
const CLAUDE_HOOK_COMMAND = "node \"$CLAUDE_PROJECT_DIR/.claude/hooks/react-doctor.mjs\"";
|
|
52264
52270
|
const CURSOR_HOOKS_RELATIVE_PATH = ".cursor/hooks.json";
|
|
52265
|
-
const CURSOR_HOOK_RELATIVE_PATH = ".cursor/hooks/react-doctor.
|
|
52271
|
+
const CURSOR_HOOK_RELATIVE_PATH = ".cursor/hooks/react-doctor.mjs";
|
|
52272
|
+
const CURSOR_HOOK_COMMAND = "node .cursor/hooks/react-doctor.mjs";
|
|
52266
52273
|
const CURSOR_HOOK_MATCHER = "Write|Edit|MultiEdit|ApplyPatch";
|
|
52267
52274
|
const CURSOR_HOOKS_SCHEMA_VERSION = 1;
|
|
52268
52275
|
const isSupportedAgent = (agent) => agent === CLAUDE_AGENT || agent === CURSOR_AGENT;
|
|
@@ -52294,7 +52301,6 @@ const writeJsonFileWithDirectoryCheck = (filePath, value) => {
|
|
|
52294
52301
|
const writeHookScript = (filePath) => {
|
|
52295
52302
|
ensureDirectoryExists(Path.dirname(filePath));
|
|
52296
52303
|
NFS.writeFileSync(filePath, buildAgentHookScript());
|
|
52297
|
-
NFS.chmodSync(filePath, 493);
|
|
52298
52304
|
};
|
|
52299
52305
|
const hasClaudeHookCommand = (groups) => groups.some((group) => (group.hooks ?? []).some((hook) => hook.command === CLAUDE_HOOK_COMMAND));
|
|
52300
52306
|
const installClaudeHook = (projectRoot) => {
|
|
@@ -52315,7 +52321,7 @@ const installClaudeHook = (projectRoot) => {
|
|
|
52315
52321
|
writeHookScript(hookPath);
|
|
52316
52322
|
return [settingsPath, hookPath];
|
|
52317
52323
|
};
|
|
52318
|
-
const hasCursorHookCommand = (handlers) => handlers.some((handler) => handler.command ===
|
|
52324
|
+
const hasCursorHookCommand = (handlers) => handlers.some((handler) => handler.command === CURSOR_HOOK_COMMAND);
|
|
52319
52325
|
const installCursorHook = (projectRoot) => {
|
|
52320
52326
|
const configPath = Path.join(projectRoot, CURSOR_HOOKS_RELATIVE_PATH);
|
|
52321
52327
|
const hookPath = Path.join(projectRoot, CURSOR_HOOK_RELATIVE_PATH);
|
|
@@ -52323,7 +52329,7 @@ const installCursorHook = (projectRoot) => {
|
|
|
52323
52329
|
const hooks = { ...config.hooks ?? {} };
|
|
52324
52330
|
const postToolUseHooks = [...hooks.postToolUse ?? []];
|
|
52325
52331
|
if (!hasCursorHookCommand(postToolUseHooks)) postToolUseHooks.push({
|
|
52326
|
-
command:
|
|
52332
|
+
command: CURSOR_HOOK_COMMAND,
|
|
52327
52333
|
matcher: CURSOR_HOOK_MATCHER,
|
|
52328
52334
|
timeout: 120
|
|
52329
52335
|
});
|
|
@@ -52337,102 +52343,111 @@ const installCursorHook = (projectRoot) => {
|
|
|
52337
52343
|
return [configPath, hookPath];
|
|
52338
52344
|
};
|
|
52339
52345
|
const buildAgentHookScript = () => [
|
|
52340
|
-
"
|
|
52341
|
-
"
|
|
52346
|
+
"import { readFileSync, writeFileSync, unlinkSync } from 'node:fs';",
|
|
52347
|
+
"import { tmpdir } from 'node:os';",
|
|
52348
|
+
"import { join, dirname } from 'node:path';",
|
|
52349
|
+
"import { fileURLToPath } from 'node:url';",
|
|
52350
|
+
"import { spawnSync } from 'node:child_process';",
|
|
52342
52351
|
"",
|
|
52343
|
-
"
|
|
52344
|
-
"
|
|
52345
|
-
"trap 'rm -f \"$input_file\" \"$output_file\"' EXIT",
|
|
52346
|
-
"cat > \"$input_file\"",
|
|
52352
|
+
"const __filename = fileURLToPath(import.meta.url);",
|
|
52353
|
+
"const __dirname = dirname(__filename);",
|
|
52347
52354
|
"",
|
|
52348
|
-
"
|
|
52349
|
-
"project_root=${CLAUDE_PROJECT_DIR:-}",
|
|
52350
|
-
"if [ -z \"$project_root\" ]; then",
|
|
52351
|
-
" project_root=$(CDPATH= cd \"$script_dir/../..\" && pwd)",
|
|
52352
|
-
"fi",
|
|
52353
|
-
"if ! cd \"$project_root\"; then",
|
|
52354
|
-
" exit 0",
|
|
52355
|
-
"fi",
|
|
52355
|
+
"const EDIT_TOOL_NAMES = new Set(['Edit', 'Write', 'MultiEdit', 'NotebookEdit', 'ApplyPatch']);",
|
|
52356
52356
|
"",
|
|
52357
|
-
"
|
|
52358
|
-
"
|
|
52359
|
-
" return 0",
|
|
52360
|
-
"
|
|
52357
|
+
"const readStdin = () => {",
|
|
52358
|
+
" try {",
|
|
52359
|
+
" return readFileSync(0, 'utf8');",
|
|
52360
|
+
" } catch {",
|
|
52361
|
+
" return '';",
|
|
52362
|
+
" }",
|
|
52363
|
+
"};",
|
|
52361
52364
|
"",
|
|
52362
|
-
"
|
|
52363
|
-
"const fs = require('node:fs');",
|
|
52364
|
-
"const inputPath = process.argv[2];",
|
|
52365
|
-
"const editToolNames = new Set(['Edit', 'Write', 'MultiEdit', 'NotebookEdit', 'ApplyPatch']);",
|
|
52366
|
-
"try {",
|
|
52367
|
-
" const input = JSON.parse(fs.readFileSync(inputPath, 'utf8') || '{}');",
|
|
52365
|
+
"const shouldScan = (input) => {",
|
|
52368
52366
|
" const eventName = input.hook_event_name || input.eventName || input.event_name;",
|
|
52369
52367
|
" if (eventName === 'PostToolBatch') {",
|
|
52370
52368
|
" const toolCalls = Array.isArray(input.tool_calls) ? input.tool_calls : [];",
|
|
52371
|
-
"
|
|
52369
|
+
" return toolCalls.some((toolCall) => EDIT_TOOL_NAMES.has(toolCall.tool_name));",
|
|
52372
52370
|
" }",
|
|
52373
52371
|
" const toolName = input.tool_name || input.toolName || input.tool;",
|
|
52374
|
-
"
|
|
52375
|
-
"}
|
|
52376
|
-
" process.exit(0);",
|
|
52377
|
-
"}",
|
|
52378
|
-
"NODE",
|
|
52379
|
-
"}",
|
|
52372
|
+
" return !toolName || EDIT_TOOL_NAMES.has(toolName);",
|
|
52373
|
+
"};",
|
|
52380
52374
|
"",
|
|
52381
|
-
"
|
|
52382
|
-
"
|
|
52383
|
-
"
|
|
52384
|
-
"
|
|
52385
|
-
"
|
|
52375
|
+
"const runReactDoctor = (outputPath) => {",
|
|
52376
|
+
" // Each candidate is a single shell command string (not an args array):",
|
|
52377
|
+
" // `shell: true` is required to run the Windows `.cmd` shims, and an args",
|
|
52378
|
+
" // array with `shell: true` trips Node's DEP0190. A missing command exits",
|
|
52379
|
+
" // 127 via the shell (no ENOENT error), so fall through on that. With no",
|
|
52380
|
+
" // runner found, exit 0 silently — stdout is parsed as the hook's JSON.",
|
|
52381
|
+
" const commands = [",
|
|
52382
|
+
" './node_modules/.bin/react-doctor --verbose --scope changed --blocking warning --no-score',",
|
|
52383
|
+
" 'react-doctor --verbose --scope changed --blocking warning --no-score',",
|
|
52384
|
+
" 'pnpm dlx react-doctor@latest --verbose --scope changed --blocking warning --no-score',",
|
|
52385
|
+
" 'npx --yes react-doctor@latest --verbose --scope changed --blocking warning --no-score',",
|
|
52386
|
+
" ];",
|
|
52386
52387
|
"",
|
|
52387
|
-
"
|
|
52388
|
-
"
|
|
52389
|
-
"
|
|
52390
|
-
"
|
|
52388
|
+
" for (const command of commands) {",
|
|
52389
|
+
" const result = spawnSync(command, { encoding: 'utf8', shell: true });",
|
|
52390
|
+
" if (result.error?.code === 'ENOENT' || result.status === 127) continue;",
|
|
52391
|
+
" try {",
|
|
52392
|
+
" writeFileSync(outputPath, (result.stdout || '') + (result.stderr || ''));",
|
|
52393
|
+
" } catch {}",
|
|
52394
|
+
" return result.status;",
|
|
52395
|
+
" }",
|
|
52391
52396
|
"",
|
|
52392
|
-
"
|
|
52393
|
-
"
|
|
52394
|
-
" return",
|
|
52395
|
-
" fi",
|
|
52397
|
+
" return 0;",
|
|
52398
|
+
"};",
|
|
52396
52399
|
"",
|
|
52397
|
-
"
|
|
52398
|
-
"
|
|
52399
|
-
"
|
|
52400
|
-
"
|
|
52400
|
+
"const cleanup = (...paths) => {",
|
|
52401
|
+
" for (const path of paths) {",
|
|
52402
|
+
" try { unlinkSync(path); } catch {}",
|
|
52403
|
+
" }",
|
|
52404
|
+
"};",
|
|
52401
52405
|
"",
|
|
52402
|
-
"
|
|
52403
|
-
"
|
|
52404
|
-
"
|
|
52406
|
+
"const main = () => {",
|
|
52407
|
+
" let input;",
|
|
52408
|
+
" try {",
|
|
52409
|
+
" const stdinContent = readStdin();",
|
|
52410
|
+
" input = JSON.parse(stdinContent || '{}');",
|
|
52411
|
+
" } catch {",
|
|
52412
|
+
" input = {};",
|
|
52413
|
+
" }",
|
|
52405
52414
|
"",
|
|
52406
|
-
"if !
|
|
52407
|
-
"
|
|
52408
|
-
"
|
|
52415
|
+
" if (!shouldScan(input)) {",
|
|
52416
|
+
" process.exit(0);",
|
|
52417
|
+
" }",
|
|
52409
52418
|
"",
|
|
52410
|
-
"
|
|
52411
|
-
"
|
|
52412
|
-
"fi",
|
|
52419
|
+
" const projectRoot = process.env.CLAUDE_PROJECT_DIR || join(__dirname, '../..');",
|
|
52420
|
+
" const outputPath = join(tmpdir(), `react-doctor-agent-hook-output-${process.pid}.txt`);",
|
|
52413
52421
|
"",
|
|
52414
|
-
"node - \"$input_file\" \"$output_file\" <<'NODE'",
|
|
52415
|
-
"const fs = require('node:fs');",
|
|
52416
|
-
"const inputPath = process.argv[2];",
|
|
52417
|
-
"const outputPath = process.argv[3];",
|
|
52418
|
-
"const readInput = () => {",
|
|
52419
52422
|
" try {",
|
|
52420
|
-
"
|
|
52423
|
+
" process.chdir(projectRoot);",
|
|
52421
52424
|
" } catch {",
|
|
52422
|
-
"
|
|
52425
|
+
" process.exit(0);",
|
|
52426
|
+
" }",
|
|
52427
|
+
"",
|
|
52428
|
+
" const scanResult = runReactDoctor(outputPath);",
|
|
52429
|
+
" if (scanResult === 0) {",
|
|
52430
|
+
" cleanup(outputPath);",
|
|
52431
|
+
" process.exit(0);",
|
|
52432
|
+
" }",
|
|
52433
|
+
"",
|
|
52434
|
+
" const scanOutput = readFileSync(outputPath, 'utf8').trim();",
|
|
52435
|
+
" cleanup(outputPath);",
|
|
52436
|
+
"",
|
|
52437
|
+
" if (!scanOutput) {",
|
|
52438
|
+
" process.exit(0);",
|
|
52439
|
+
" }",
|
|
52440
|
+
"",
|
|
52441
|
+
" const message = `React Doctor found issues in the changed files. Review this output and fix the regressions before finishing. For confirmed issues that cannot be fixed now, create GitHub issues with the rule, file/line, confidence, impact, and proposed fix.\\n\\n${scanOutput}`;",
|
|
52442
|
+
"",
|
|
52443
|
+
" if (input.hook_event_name === 'PostToolBatch') {",
|
|
52444
|
+
" console.log(JSON.stringify({ hookSpecificOutput: { hookEventName: 'PostToolBatch', additionalContext: message } }));",
|
|
52445
|
+
" } else {",
|
|
52446
|
+
" console.log(JSON.stringify({ additional_context: message }));",
|
|
52423
52447
|
" }",
|
|
52424
52448
|
"};",
|
|
52425
|
-
"
|
|
52426
|
-
"
|
|
52427
|
-
"if (!scanOutput) process.exit(0);",
|
|
52428
|
-
"const message = `React Doctor found issues in the changed files. Review this output and fix the regressions before finishing. For confirmed issues that cannot be fixed now, create GitHub issues with the rule, file/line, confidence, impact, and proposed fix.\\n\\n${scanOutput}`;",
|
|
52429
|
-
"if (input.hook_event_name === 'PostToolBatch') {",
|
|
52430
|
-
" console.log(JSON.stringify({ hookSpecificOutput: { hookEventName: 'PostToolBatch', additionalContext: message } }));",
|
|
52431
|
-
"} else {",
|
|
52432
|
-
" console.log(JSON.stringify({ additional_context: message }));",
|
|
52433
|
-
"}",
|
|
52434
|
-
"NODE",
|
|
52435
|
-
""
|
|
52449
|
+
"",
|
|
52450
|
+
"main();"
|
|
52436
52451
|
].join("\n");
|
|
52437
52452
|
const installReactDoctorAgentHooks = (options) => {
|
|
52438
52453
|
const installedAgents = [];
|
|
@@ -55370,6 +55385,14 @@ const applyColorPreference = (argv, env = process.env) => {
|
|
|
55370
55385
|
setColorEnabled(enabled);
|
|
55371
55386
|
};
|
|
55372
55387
|
//#endregion
|
|
55388
|
+
//#region src/cli/utils/ensure-windows-utf8-console.ts
|
|
55389
|
+
const ensureWindowsUtf8Console = () => {
|
|
55390
|
+
if (process.platform !== "win32" || !process.stdout.isTTY) return;
|
|
55391
|
+
try {
|
|
55392
|
+
execFileSync("chcp.com", ["65001"], { stdio: "ignore" });
|
|
55393
|
+
} catch {}
|
|
55394
|
+
};
|
|
55395
|
+
//#endregion
|
|
55373
55396
|
//#region src/cli/utils/exit-gracefully.ts
|
|
55374
55397
|
const exitGracefully = () => {
|
|
55375
55398
|
try {
|
|
@@ -55728,6 +55751,7 @@ if (process.argv.includes("-V") && !strippedArgv.includes("-V")) {
|
|
|
55728
55751
|
process.exit(0);
|
|
55729
55752
|
}
|
|
55730
55753
|
applyColorPreference(strippedArgv);
|
|
55754
|
+
ensureWindowsUtf8Console();
|
|
55731
55755
|
const argv = normalizeHelpInvocation(strippedArgv, knownCommands);
|
|
55732
55756
|
Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => program.parseAsync(argv)).then(() => flushSentry()).catch(async (error) => {
|
|
55733
55757
|
const isUserError = isExpectedUserError(error);
|
|
@@ -55746,4 +55770,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
|
|
|
55746
55770
|
export {};
|
|
55747
55771
|
|
|
55748
55772
|
//# sourceMappingURL=cli.js.map
|
|
55749
|
-
//# debugId=
|
|
55773
|
+
//# debugId=f1523493-79d1-56b7-9f5f-78f1dd741d1e
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="faa2d232-c423-58f8-97f4-ba8d41a199d7")}catch(e){}}();
|
|
3
3
|
import { r as __toESM$1, t as __commonJSMin$1 } from "./chunk-N93fKeF6.js";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import * as NFS from "node:fs";
|
|
@@ -37290,6 +37290,11 @@ const toCanonicalPath = (filePath) => {
|
|
|
37290
37290
|
};
|
|
37291
37291
|
const DEAD_CODE_PLUGIN = "deslop";
|
|
37292
37292
|
const DEAD_CODE_CATEGORY = "Maintainability";
|
|
37293
|
+
const REACT_DOCTOR_TOOLCHAIN_PACKAGES = new Set([
|
|
37294
|
+
"react-doctor",
|
|
37295
|
+
"eslint-plugin-react-doctor",
|
|
37296
|
+
"oxlint-plugin-react-doctor"
|
|
37297
|
+
]);
|
|
37293
37298
|
const DEAD_CODE_WORKER_SCRIPT = `
|
|
37294
37299
|
const inputChunks = [];
|
|
37295
37300
|
process.stdin.on("data", (chunk) => inputChunks.push(chunk));
|
|
@@ -37595,6 +37600,7 @@ const checkDeadCode = async (options) => {
|
|
|
37595
37600
|
});
|
|
37596
37601
|
}
|
|
37597
37602
|
for (const unusedDependency of result.unusedDependencies) {
|
|
37603
|
+
if (REACT_DOCTOR_TOOLCHAIN_PACKAGES.has(unusedDependency.name)) continue;
|
|
37598
37604
|
const label = unusedDependency.isDevDependency ? "devDependency" : "dependency";
|
|
37599
37605
|
diagnostics.push({
|
|
37600
37606
|
filePath: "package.json",
|
|
@@ -41645,4 +41651,4 @@ const toJsonReport = (result, options) => buildJsonReport({
|
|
|
41645
41651
|
export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
|
|
41646
41652
|
|
|
41647
41653
|
//# sourceMappingURL=index.js.map
|
|
41648
|
-
//# debugId=
|
|
41654
|
+
//# debugId=faa2d232-c423-58f8-97f4-ba8d41a199d7
|
package/dist/lsp.js
CHANGED
|
@@ -37275,6 +37275,11 @@ const toCanonicalPath = (filePath) => {
|
|
|
37275
37275
|
};
|
|
37276
37276
|
const DEAD_CODE_PLUGIN = "deslop";
|
|
37277
37277
|
const DEAD_CODE_CATEGORY = "Maintainability";
|
|
37278
|
+
const REACT_DOCTOR_TOOLCHAIN_PACKAGES = new Set([
|
|
37279
|
+
"react-doctor",
|
|
37280
|
+
"eslint-plugin-react-doctor",
|
|
37281
|
+
"oxlint-plugin-react-doctor"
|
|
37282
|
+
]);
|
|
37278
37283
|
const DEAD_CODE_WORKER_SCRIPT = `
|
|
37279
37284
|
const inputChunks = [];
|
|
37280
37285
|
process.stdin.on("data", (chunk) => inputChunks.push(chunk));
|
|
@@ -37580,6 +37585,7 @@ const checkDeadCode = async (options) => {
|
|
|
37580
37585
|
});
|
|
37581
37586
|
}
|
|
37582
37587
|
for (const unusedDependency of result.unusedDependencies) {
|
|
37588
|
+
if (REACT_DOCTOR_TOOLCHAIN_PACKAGES.has(unusedDependency.name)) continue;
|
|
37583
37589
|
const label = unusedDependency.isDevDependency ? "devDependency" : "dependency";
|
|
37584
37590
|
diagnostics.push({
|
|
37585
37591
|
filePath: "package.json",
|
|
@@ -43365,5 +43371,5 @@ const startLanguageServer = () => {
|
|
|
43365
43371
|
};
|
|
43366
43372
|
//#endregion
|
|
43367
43373
|
export { startLanguageServer };
|
|
43368
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
43369
|
-
//# debugId=
|
|
43374
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="47940f68-872d-59ed-bdd2-40ef7848566c")}catch(e){}}();
|
|
43375
|
+
//# debugId=47940f68-872d-59ed-bdd2-40ef7848566c
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-doctor",
|
|
3
|
-
"version": "0.5.8-dev.
|
|
3
|
+
"version": "0.5.8-dev.fff9466",
|
|
4
4
|
"description": "Your agent writes bad React. This catches it",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"accessibility",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"vscode-languageserver-textdocument": "^1.0.12",
|
|
66
66
|
"vscode-uri": "^3.1.0",
|
|
67
67
|
"deslop-js": "0.5.8",
|
|
68
|
-
"oxlint-plugin-react-doctor": "0.5.8-dev.
|
|
68
|
+
"oxlint-plugin-react-doctor": "0.5.8-dev.fff9466"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@types/babel__code-frame": "^7.27.0",
|