react-doctor 0.7.6-dev.82e10cd → 0.7.6-dev.8528def
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 +12 -13
- package/dist/index.d.ts +4 -3
- package/dist/index.js +6 -9
- package/dist/lsp.js +7 -10
- package/package.json +5 -5
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]="bc56f5c4-5b95-5727-8e86-d43a534abbbc")}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";
|
|
@@ -40762,9 +40762,7 @@ const setColorEnabled = (enabled) => {
|
|
|
40762
40762
|
highlighter.gray = colors.gray;
|
|
40763
40763
|
highlighter.bold = colors.bold;
|
|
40764
40764
|
};
|
|
40765
|
-
const
|
|
40766
|
-
const shouldIncludeExplicitLintPath = (filePath, project) => JSX_FILE_PATTERN.test(filePath) || project?.framework === "nextjs" && NEXT_ENTRY_FILE_PATTERN.test(filePath);
|
|
40767
|
-
const computeExplicitLintIncludePaths = (includePaths, project) => includePaths.length > 0 ? includePaths.filter((filePath) => shouldIncludeExplicitLintPath(filePath, project)) : void 0;
|
|
40765
|
+
const computeExplicitLintIncludePaths = (includePaths) => includePaths.length > 0 ? includePaths.filter(isLintableSourceFile) : void 0;
|
|
40768
40766
|
const LINGUIST_ATTRIBUTE_PATTERN = /^linguist-(?:vendored|generated)(?:=([a-zA-Z0-9]+))?$/i;
|
|
40769
40767
|
const FALSY_VALUES = new Set([
|
|
40770
40768
|
"false",
|
|
@@ -41603,11 +41601,11 @@ const resolveDeadCodeTimeout = (input) => {
|
|
|
41603
41601
|
phaseTimeoutMs: workerTimeoutMs + DEAD_CODE_PHASE_TIMEOUT_OVER_WORKER_MS
|
|
41604
41602
|
};
|
|
41605
41603
|
};
|
|
41606
|
-
const resolveLintIncludePaths = (rootDirectory, userConfig
|
|
41604
|
+
const resolveLintIncludePaths = (rootDirectory, userConfig) => {
|
|
41607
41605
|
if (!Array.isArray(userConfig?.ignore?.files) || userConfig.ignore.files.length === 0) return;
|
|
41608
41606
|
const ignoredPatterns = compileIgnoredFilePatterns(userConfig);
|
|
41609
41607
|
return listSourceFiles(rootDirectory).filter((filePath) => {
|
|
41610
|
-
if (!
|
|
41608
|
+
if (!isLintableSourceFile(filePath)) return false;
|
|
41611
41609
|
return !isFileIgnoredByPatterns(filePath, rootDirectory, ignoredPatterns);
|
|
41612
41610
|
});
|
|
41613
41611
|
};
|
|
@@ -45489,7 +45487,7 @@ const runInspect = (input, hooks = {}) => gen(function* () {
|
|
|
45489
45487
|
directory: scanDirectory,
|
|
45490
45488
|
repo
|
|
45491
45489
|
}).pipe(orElseSucceed(() => null)) : succeed$2(null));
|
|
45492
|
-
const lintIncludePaths = (input.
|
|
45490
|
+
const lintIncludePaths = (input.skipExplicitIncludePathFilter ? input.includePaths.length > 0 ? [...input.includePaths] : void 0 : computeExplicitLintIncludePaths([...input.includePaths])) ?? resolveLintIncludePaths(scanDirectory, resolvedConfig.config);
|
|
45493
45491
|
const fallbackScannedFilePaths = input.suppressScanSummary ? (lintIncludePaths ?? (yield* filesService.listSourceFiles(scanDirectory))).map((relativePath) => Path.resolve(scanDirectory, relativePath)) : [];
|
|
45494
45492
|
const beforeLint = hooks.beforeLint ?? NO_HOOKS.beforeLint;
|
|
45495
45493
|
const afterLint = hooks.afterLint ?? NO_HOOKS.afterLint;
|
|
@@ -46667,7 +46665,7 @@ const makeNoopConsole = () => ({
|
|
|
46667
46665
|
});
|
|
46668
46666
|
//#endregion
|
|
46669
46667
|
//#region src/cli/utils/version.ts
|
|
46670
|
-
const VERSION = "0.7.6-dev.
|
|
46668
|
+
const VERSION = "0.7.6-dev.8528def";
|
|
46671
46669
|
//#endregion
|
|
46672
46670
|
//#region src/cli/utils/json-mode.ts
|
|
46673
46671
|
let context = null;
|
|
@@ -47036,13 +47034,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
|
|
|
47036
47034
|
* uploads source-map artifacts under, so stack frames symbolicate. Honors the
|
|
47037
47035
|
* standard `SENTRY_RELEASE` override.
|
|
47038
47036
|
*/
|
|
47039
|
-
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.7.6-dev.
|
|
47037
|
+
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.7.6-dev.8528def`;
|
|
47040
47038
|
/**
|
|
47041
47039
|
* Deployment environment shown in Sentry's environment filter. Defaults to
|
|
47042
47040
|
* `production` for tagged releases and `development` for dev/unbuilt versions,
|
|
47043
47041
|
* overridable via the standard `SENTRY_ENVIRONMENT` env var.
|
|
47044
47042
|
*/
|
|
47045
|
-
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.7.6-dev.
|
|
47043
|
+
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.7.6-dev.8528def") ? "development" : "production");
|
|
47046
47044
|
/**
|
|
47047
47045
|
* Performance-tracing sample rate in `[0, 1]`. Reads `SENTRY_TRACES_SAMPLE_RATE`
|
|
47048
47046
|
* (set to `0` to disable tracing) and falls back to
|
|
@@ -59676,7 +59674,8 @@ const buildScanAttributes = (input) => {
|
|
|
59676
59674
|
hasCustomConfig: input.hasCustomConfig,
|
|
59677
59675
|
rulesConfigured: ruleKeys.length,
|
|
59678
59676
|
rulesDisabled: ruleKeys.filter((key) => ruleOverrides[key] === "off").length,
|
|
59679
|
-
fileCount: input.result?.scannedFileCount ?? null
|
|
59677
|
+
fileCount: input.result?.scannedFileCount ?? null,
|
|
59678
|
+
nonJsxFileCount: input.result?.analyzedFiles?.filter((filePath) => !JSX_FILE_PATTERN.test(filePath)).length ?? null
|
|
59680
59679
|
});
|
|
59681
59680
|
};
|
|
59682
59681
|
/**
|
|
@@ -65181,7 +65180,7 @@ ${highlighter.dim("Learn more:")}
|
|
|
65181
65180
|
${highlighter.info(CI_URL)}
|
|
65182
65181
|
`;
|
|
65183
65182
|
const collectCategoryOption = (value, previousValues) => [...previousValues ?? [], value];
|
|
65184
|
-
const program = new Command().name("react-doctor").description("Diagnose React codebase health").version(VERSION, "-v, --version", "display the version number").argument("[directory]", "project directory to scan", ".").option("--lint", "enable linting").option("--no-lint", "skip linting").option("--dead-code", "enable dead-code analysis (default)").option("--no-dead-code", "skip dead-code analysis (unused files / exports / dependencies, circular imports)").option("--supply-chain", "enable the dependency supply-chain scan (default)").option("--no-supply-chain", "skip the dependency supply-chain scan (Socket.dev dependency health checks)").option("--verbose", "show every rule and per-file details (default shows top 3 rules)").option("--debug", "force a Sentry trace and print its id at the end (paste it into a bug report)").option("--output-dir <dir>", "directory for the full diagnostics dump (default: a temp folder)").option("--score", "output only the score").option("--json", "output a single structured JSON report (suppresses other output)").option("--json-compact", "with --json, emit compact JSON (no indentation)").option("--json-out <path>", "with --json, write the report to a file instead of stdout").option("-y, --yes", "skip prompts, scan all workspace projects").option("--no-parallel", "lint serially with one worker (default: parallel across CPU cores; set the worker count with REACT_DOCTOR_PARALLEL)").option("--project <name>", "select projects: workspace names or directory paths (comma-separated for multiple); overrides the `projects` config field").option("--scope <value>", "how much to scan/report: full (default), files, changed (only new issues vs base), or lines (only changed lines)").option("--base <ref>", "base git ref for files/changed/lines scope (auto-detected when omitted)").addOption(new Option("--diff [base]", "[deprecated] alias for --scope changed (pass `false` to force a full scan)").hideHelp()).addOption(new Option("--changed-files-from <file>", "scan source files listed in a newline-delimited changed-files file").hideHelp()).option("--no-score", "skip the score API, the share URL, and crash reporting").addOption(new Option("--category <category>", "only show diagnostics in a category (repeatable; e.g. Security)").argParser(collectCategoryOption)).option("--no-telemetry", "alias for --no-score (skip the score API, share URL, and crash reporting)").option("--staged", "scan only staged (git index) files for pre-commit hooks").option("--max-duration <seconds>", "scan time budget for the whole run, shared across workspace projects: past it, remaining lint batches and dead-code are skipped and partial results are reported (skipped files are listed in the JSON report)").option("--blocking <level>", "severity that fails CI: error (default), warning, or none (advisory)").addOption(new Option("--fail-on <level>", "[deprecated] alias for --blocking <level>").hideHelp()).option("--no-respect-inline-disables", "audit mode: neutralize inline lint suppressions before scanning").option("--warnings", "show warning-severity diagnostics (default)").option("--no-warnings", "hide warning-severity diagnostics (errors only)").option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").addHelpText("after", renderRootHelpEpilog);
|
|
65183
|
+
const program = new Command().name("react-doctor").description("Diagnose React codebase health").version(VERSION, "-v, --version", "display the version number").argument("[directory]", "project directory to scan", ".").option("--lint", "enable linting").option("--no-lint", "skip linting").option("--dead-code", "enable dead-code analysis (default)").option("--no-dead-code", "skip dead-code analysis (unused files / exports / dependencies, circular imports)").option("--supply-chain", "enable the dependency supply-chain scan (default)").option("--no-supply-chain", "skip the dependency supply-chain scan (Socket.dev dependency health checks)").option("--verbose", "show every rule and per-file details (default shows top 3 rules)").option("--debug", "force a Sentry trace and print its id at the end (paste it into a bug report)").option("--output-dir <dir>", "directory for the full diagnostics dump (default: a temp folder)").option("--score", "output only the score").option("--json", "output a single structured JSON report (suppresses other output)").option("--json-compact", "with --json, emit compact JSON (no indentation)").option("--json-out <path>", "with --json, write the report to a file instead of stdout").option("-y, --yes", "skip prompts, scan all workspace projects").option("--no-parallel", "lint serially with one worker (default: parallel across CPU cores; set the worker count with REACT_DOCTOR_PARALLEL)").option("--project <name>", "select projects: workspace names or directory paths (comma-separated for multiple); overrides the `projects` config field").option("--scope <value>", "how much supported JS/TS source to scan/report: full (default), files, changed (only new issues vs base), or lines (only changed lines)").option("--base <ref>", "base git ref for files/changed/lines scope (auto-detected when omitted)").addOption(new Option("--diff [base]", "[deprecated] alias for --scope changed (pass `false` to force a full scan)").hideHelp()).addOption(new Option("--changed-files-from <file>", "scan source files listed in a newline-delimited changed-files file").hideHelp()).option("--no-score", "skip the score API, the share URL, and crash reporting").addOption(new Option("--category <category>", "only show diagnostics in a category (repeatable; e.g. Security)").argParser(collectCategoryOption)).option("--no-telemetry", "alias for --no-score (skip the score API, share URL, and crash reporting)").option("--staged", "scan only staged (git index) files for pre-commit hooks").option("--max-duration <seconds>", "scan time budget for the whole run, shared across workspace projects: past it, remaining lint batches and dead-code are skipped and partial results are reported (skipped files are listed in the JSON report)").option("--blocking <level>", "severity that fails CI: error (default), warning, or none (advisory)").addOption(new Option("--fail-on <level>", "[deprecated] alias for --blocking <level>").hideHelp()).option("--no-respect-inline-disables", "audit mode: neutralize inline lint suppressions before scanning").option("--warnings", "show warning-severity diagnostics (default)").option("--no-warnings", "hide warning-severity diagnostics (errors only)").option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").addHelpText("after", renderRootHelpEpilog);
|
|
65185
65184
|
program.action(inspectAction);
|
|
65186
65185
|
program.command("why <location>").description("Explain why a rule fired (or why a suppression didn't apply) at a file:line").option("--project <name>", "select projects: workspace names or directory paths (comma-separated for multiple)").option("-c, --cwd <cwd>", "working directory", process.cwd()).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").action((location, options) => whyAction(location, options));
|
|
65187
65186
|
program.command("install").alias("setup").description("Install the react-doctor skill into your coding agents and optional git hook").option("-y, --yes", "skip prompts, install for all detected agents").option("--dry-run", "show what would be installed without writing files").option("--agent-hooks", "install native non-blocking agent hooks for Claude Code and Cursor").option("-c, --cwd <cwd>", "working directory", process.cwd()).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").addHelpText("after", renderInstallHelpEpilog).action(installAction);
|
|
@@ -65231,4 +65230,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
|
|
|
65231
65230
|
export {};
|
|
65232
65231
|
|
|
65233
65232
|
//# sourceMappingURL=cli.js.map
|
|
65234
|
-
//# debugId=
|
|
65233
|
+
//# debugId=bc56f5c4-5b95-5727-8e86-d43a534abbbc
|
package/dist/index.d.ts
CHANGED
|
@@ -9654,6 +9654,7 @@ interface DiagnoseOptions {
|
|
|
9654
9654
|
/** See `ReactDoctorConfig.deadCode`. Ignored in diff mode. */
|
|
9655
9655
|
deadCode?: boolean;
|
|
9656
9656
|
verbose?: boolean;
|
|
9657
|
+
/** Restrict linting to these supported JS/TS source files. */
|
|
9657
9658
|
includePaths?: string[];
|
|
9658
9659
|
/**
|
|
9659
9660
|
* Per-call override for `ReactDoctorConfig.respectInlineDisables`.
|
|
@@ -9915,9 +9916,9 @@ interface JsonReportProjectEntry {
|
|
|
9915
9916
|
skippedCheckReasons?: Record<string, string>;
|
|
9916
9917
|
/**
|
|
9917
9918
|
* Number of source files this scan's linter examined. In diff / changed
|
|
9918
|
-
* mode it's the count of changed
|
|
9919
|
-
*
|
|
9920
|
-
*
|
|
9919
|
+
* mode it's the count of changed supported JS/TS source files; in a full
|
|
9920
|
+
* scan it's the whole source tree. `0` in a diff scan means the changed
|
|
9921
|
+
* files held nothing React Doctor lints —
|
|
9921
9922
|
* the GitHub Action reads that as "nothing to report" (skips the PR comment;
|
|
9922
9923
|
* the commit status says "skipped"). Optional: absent on reports from
|
|
9923
9924
|
* constructors that don't track it (e.g. `toJsonReport`).
|
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]="3e7262c1-34a6-5fd7-a4a2-5e7a15ca735d")}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 reactDoctorPlugin, { ALL_REACT_DOCTOR_RULE_KEYS, CROSS_FILE_DEPENDENCY_COLLECTORS, CROSS_FILE_RULE_IDS, FRAMEWORK_SPECIFIC_RULE_KEYS, FRAMEWORK_TOKENS, MOTION_LIBRARY_PACKAGES, REACT_COMPILER_RULES, REACT_DOCTOR_RULES, classifySecurityScanFile, collectCrossFileDependencyProbes, resetManifestCaches, shouldReadSecurityScanContent } from "oxlint-plugin-react-doctor";
|
|
@@ -32930,7 +32930,6 @@ const IGNORED_DIRECTORIES = new Set([
|
|
|
32930
32930
|
"out",
|
|
32931
32931
|
"storybook-static"
|
|
32932
32932
|
]);
|
|
32933
|
-
const JSX_FILE_PATTERN = /\.(tsx|jsx)$/;
|
|
32934
32933
|
const MILLISECONDS_PER_SECOND = 1e3;
|
|
32935
32934
|
const SCORE_API_URL = "https://www.react.doctor/api/score";
|
|
32936
32935
|
const FETCH_TIMEOUT_MS = 1e4;
|
|
@@ -37516,9 +37515,7 @@ const highlighter = {
|
|
|
37516
37515
|
gray: import_picocolors.default.gray,
|
|
37517
37516
|
bold: import_picocolors.default.bold
|
|
37518
37517
|
};
|
|
37519
|
-
const
|
|
37520
|
-
const shouldIncludeExplicitLintPath = (filePath, project) => JSX_FILE_PATTERN.test(filePath) || project?.framework === "nextjs" && NEXT_ENTRY_FILE_PATTERN.test(filePath);
|
|
37521
|
-
const computeExplicitLintIncludePaths = (includePaths, project) => includePaths.length > 0 ? includePaths.filter((filePath) => shouldIncludeExplicitLintPath(filePath, project)) : void 0;
|
|
37518
|
+
const computeExplicitLintIncludePaths = (includePaths) => includePaths.length > 0 ? includePaths.filter(isLintableSourceFile) : void 0;
|
|
37522
37519
|
const LINGUIST_ATTRIBUTE_PATTERN = /^linguist-(?:vendored|generated)(?:=([a-zA-Z0-9]+))?$/i;
|
|
37523
37520
|
const FALSY_VALUES = new Set([
|
|
37524
37521
|
"false",
|
|
@@ -38360,11 +38357,11 @@ const resolveDeadCodeTimeout = (input) => {
|
|
|
38360
38357
|
phaseTimeoutMs: workerTimeoutMs + DEAD_CODE_PHASE_TIMEOUT_OVER_WORKER_MS
|
|
38361
38358
|
};
|
|
38362
38359
|
};
|
|
38363
|
-
const resolveLintIncludePaths = (rootDirectory, userConfig
|
|
38360
|
+
const resolveLintIncludePaths = (rootDirectory, userConfig) => {
|
|
38364
38361
|
if (!Array.isArray(userConfig?.ignore?.files) || userConfig.ignore.files.length === 0) return;
|
|
38365
38362
|
const ignoredPatterns = compileIgnoredFilePatterns(userConfig);
|
|
38366
38363
|
return listSourceFiles(rootDirectory).filter((filePath) => {
|
|
38367
|
-
if (!
|
|
38364
|
+
if (!isLintableSourceFile(filePath)) return false;
|
|
38368
38365
|
return !isFileIgnoredByPatterns(filePath, rootDirectory, ignoredPatterns);
|
|
38369
38366
|
});
|
|
38370
38367
|
};
|
|
@@ -42246,7 +42243,7 @@ const runInspect = (input, hooks = {}) => gen(function* () {
|
|
|
42246
42243
|
directory: scanDirectory,
|
|
42247
42244
|
repo
|
|
42248
42245
|
}).pipe(orElseSucceed(() => null)) : succeed$2(null));
|
|
42249
|
-
const lintIncludePaths = (input.
|
|
42246
|
+
const lintIncludePaths = (input.skipExplicitIncludePathFilter ? input.includePaths.length > 0 ? [...input.includePaths] : void 0 : computeExplicitLintIncludePaths([...input.includePaths])) ?? resolveLintIncludePaths(scanDirectory, resolvedConfig.config);
|
|
42250
42247
|
const fallbackScannedFilePaths = input.suppressScanSummary ? (lintIncludePaths ?? (yield* filesService.listSourceFiles(scanDirectory))).map((relativePath) => Path.resolve(scanDirectory, relativePath)) : [];
|
|
42251
42248
|
const beforeLint = hooks.beforeLint ?? NO_HOOKS.beforeLint;
|
|
42252
42249
|
const afterLint = hooks.afterLint ?? NO_HOOKS.afterLint;
|
|
@@ -43210,4 +43207,4 @@ const toJsonReport = (result, options) => buildJsonReport({
|
|
|
43210
43207
|
export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, hasReactRuntime, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
|
|
43211
43208
|
|
|
43212
43209
|
//# sourceMappingURL=index.js.map
|
|
43213
|
-
//# debugId=
|
|
43210
|
+
//# debugId=3e7262c1-34a6-5fd7-a4a2-5e7a15ca735d
|
package/dist/lsp.js
CHANGED
|
@@ -32959,7 +32959,6 @@ const IGNORED_DIRECTORIES = new Set([
|
|
|
32959
32959
|
"out",
|
|
32960
32960
|
"storybook-static"
|
|
32961
32961
|
]);
|
|
32962
|
-
const JSX_FILE_PATTERN = /\.(tsx|jsx)$/;
|
|
32963
32962
|
const MILLISECONDS_PER_SECOND = 1e3;
|
|
32964
32963
|
const SCORE_API_URL = "https://www.react.doctor/api/score";
|
|
32965
32964
|
const FETCH_TIMEOUT_MS = 1e4;
|
|
@@ -37494,9 +37493,7 @@ const highlighter = {
|
|
|
37494
37493
|
gray: import_picocolors.default.gray,
|
|
37495
37494
|
bold: import_picocolors.default.bold
|
|
37496
37495
|
};
|
|
37497
|
-
const
|
|
37498
|
-
const shouldIncludeExplicitLintPath = (filePath, project) => JSX_FILE_PATTERN.test(filePath) || project?.framework === "nextjs" && NEXT_ENTRY_FILE_PATTERN.test(filePath);
|
|
37499
|
-
const computeExplicitLintIncludePaths = (includePaths, project) => includePaths.length > 0 ? includePaths.filter((filePath) => shouldIncludeExplicitLintPath(filePath, project)) : void 0;
|
|
37496
|
+
const computeExplicitLintIncludePaths = (includePaths) => includePaths.length > 0 ? includePaths.filter(isLintableSourceFile) : void 0;
|
|
37500
37497
|
const LINGUIST_ATTRIBUTE_PATTERN = /^linguist-(?:vendored|generated)(?:=([a-zA-Z0-9]+))?$/i;
|
|
37501
37498
|
const FALSY_VALUES = new Set([
|
|
37502
37499
|
"false",
|
|
@@ -38338,11 +38335,11 @@ const resolveDeadCodeTimeout = (input) => {
|
|
|
38338
38335
|
phaseTimeoutMs: workerTimeoutMs + DEAD_CODE_PHASE_TIMEOUT_OVER_WORKER_MS
|
|
38339
38336
|
};
|
|
38340
38337
|
};
|
|
38341
|
-
const resolveLintIncludePaths = (rootDirectory, userConfig
|
|
38338
|
+
const resolveLintIncludePaths = (rootDirectory, userConfig) => {
|
|
38342
38339
|
if (!Array.isArray(userConfig?.ignore?.files) || userConfig.ignore.files.length === 0) return;
|
|
38343
38340
|
const ignoredPatterns = compileIgnoredFilePatterns(userConfig);
|
|
38344
38341
|
return listSourceFiles(rootDirectory).filter((filePath) => {
|
|
38345
|
-
if (!
|
|
38342
|
+
if (!isLintableSourceFile(filePath)) return false;
|
|
38346
38343
|
return !isFileIgnoredByPatterns(filePath, rootDirectory, ignoredPatterns);
|
|
38347
38344
|
});
|
|
38348
38345
|
};
|
|
@@ -42224,7 +42221,7 @@ const runInspect = (input, hooks = {}) => gen(function* () {
|
|
|
42224
42221
|
directory: scanDirectory,
|
|
42225
42222
|
repo
|
|
42226
42223
|
}).pipe(orElseSucceed(() => null)) : succeed$2(null));
|
|
42227
|
-
const lintIncludePaths = (input.
|
|
42224
|
+
const lintIncludePaths = (input.skipExplicitIncludePathFilter ? input.includePaths.length > 0 ? [...input.includePaths] : void 0 : computeExplicitLintIncludePaths([...input.includePaths])) ?? resolveLintIncludePaths(scanDirectory, resolvedConfig.config);
|
|
42228
42225
|
const fallbackScannedFilePaths = input.suppressScanSummary ? (lintIncludePaths ?? (yield* filesService.listSourceFiles(scanDirectory))).map((relativePath) => Path.resolve(scanDirectory, relativePath)) : [];
|
|
42229
42226
|
const beforeLint = hooks.beforeLint ?? NO_HOOKS.beforeLint;
|
|
42230
42227
|
const afterLint = hooks.afterLint ?? NO_HOOKS.afterLint;
|
|
@@ -42719,7 +42716,7 @@ const runEditorScan = async (input) => {
|
|
|
42719
42716
|
warnings,
|
|
42720
42717
|
isCi: false,
|
|
42721
42718
|
resolveLocalGithubViewerPermission: false,
|
|
42722
|
-
|
|
42719
|
+
skipExplicitIncludePathFilter: true
|
|
42723
42720
|
}).pipe(withSpan("runEditorScan", { attributes: {
|
|
42724
42721
|
"editor.lint": lint,
|
|
42725
42722
|
"editor.runDeadCode": runDeadCode
|
|
@@ -44847,5 +44844,5 @@ const startLanguageServer = () => {
|
|
|
44847
44844
|
};
|
|
44848
44845
|
//#endregion
|
|
44849
44846
|
export { startLanguageServer };
|
|
44850
|
-
!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]="
|
|
44851
|
-
//# debugId=
|
|
44847
|
+
!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]="a3135dfe-cc85-5d34-adea-93f5c29d9bcb")}catch(e){}}();
|
|
44848
|
+
//# debugId=a3135dfe-cc85-5d34-adea-93f5c29d9bcb
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-doctor",
|
|
3
|
-
"version": "0.7.6-dev.
|
|
3
|
+
"version": "0.7.6-dev.8528def",
|
|
4
4
|
"description": "Your agent writes bad React. This catches it",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"accessibility",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"vscode-languageserver-textdocument": "^1.0.12",
|
|
66
66
|
"vscode-uri": "^3.1.0",
|
|
67
67
|
"yaml": "^2.9.0",
|
|
68
|
-
"
|
|
69
|
-
"
|
|
68
|
+
"oxlint-plugin-react-doctor": "0.7.6-dev.8528def",
|
|
69
|
+
"deslop-js": "0.7.6"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@types/babel__code-frame": "^7.27.0",
|
|
@@ -75,8 +75,8 @@
|
|
|
75
75
|
"commander": "^14.0.3",
|
|
76
76
|
"ora": "^9.4.0",
|
|
77
77
|
"@react-doctor/api": "0.7.6",
|
|
78
|
-
"@react-doctor/
|
|
79
|
-
"@react-doctor/
|
|
78
|
+
"@react-doctor/language-server": "0.7.6",
|
|
79
|
+
"@react-doctor/core": "0.7.6"
|
|
80
80
|
},
|
|
81
81
|
"engines": {
|
|
82
82
|
"node": "^20.19.0 || >=22.13.0"
|