react-doctor 0.7.5-dev.3afd146 → 0.7.5-dev.70eff9a
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 +38 -9
- package/dist/index.d.ts +3 -3
- package/dist/index.js +35 -6
- package/dist/lsp.js +35 -6
- 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]="ed6bfef3-a274-5972-833b-77462a1156e2")}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";
|
|
@@ -42368,7 +42368,7 @@ const normalizeConfigForHash = (config) => {
|
|
|
42368
42368
|
if (Array.isArray(clone?.jsPlugins)) clone.jsPlugins = clone.jsPlugins.map((_, index) => `<plugin:${index}>`);
|
|
42369
42369
|
return clone;
|
|
42370
42370
|
};
|
|
42371
|
-
const computeRulesetHash = (input) => crypto.createHash("sha1").update(JSON.stringify(normalizeConfigForHash(input.config))).update("\0").update([...input.toolchainVersions].join("\0")).update("\0").update([...input.ignorePatterns].join("\n")).update("\0").update(input.tsconfigContent ?? "").digest("hex");
|
|
42371
|
+
const computeRulesetHash = (input) => crypto.createHash("sha1").update(JSON.stringify(normalizeConfigForHash(input.config))).update("\0").update([...input.toolchainVersions].join("\0")).update("\0").update([...input.ignorePatterns].join("\n")).update("\0").update(input.tsconfigContent ?? "").update("\0").update(input.respectInlineDisables ? "respect-inline-disables" : "audit-mode").digest("hex");
|
|
42372
42372
|
/**
|
|
42373
42373
|
* Loads a plugin module via the local require resolver and extracts
|
|
42374
42374
|
* `(name, ruleNames)` from either `module.exports.meta + rules` or
|
|
@@ -42812,6 +42812,23 @@ const resolveTsConfigRelativePath = (rootDirectory) => {
|
|
|
42812
42812
|
for (const filename of TSCONFIG_FILENAMES) if (NFS.existsSync(Path.join(rootDirectory, filename))) return `./${filename}`;
|
|
42813
42813
|
return null;
|
|
42814
42814
|
};
|
|
42815
|
+
const DERIVED_STATE_RULE_PRIORITY = new Map([
|
|
42816
|
+
["no-initialize-state", 0],
|
|
42817
|
+
["no-adjust-state-on-prop-change", 1],
|
|
42818
|
+
["no-derived-state", 2],
|
|
42819
|
+
["no-derived-state-effect", 3]
|
|
42820
|
+
]);
|
|
42821
|
+
const doDiagnosticSpansOverlap = (first, second) => {
|
|
42822
|
+
if (first.filePath !== second.filePath || first.plugin !== second.plugin) return false;
|
|
42823
|
+
if (first.offset !== void 0 && second.offset !== void 0) {
|
|
42824
|
+
const firstEnd = first.offset + Math.max(first.length ?? 1, 1);
|
|
42825
|
+
const secondEnd = second.offset + Math.max(second.length ?? 1, 1);
|
|
42826
|
+
return first.offset < secondEnd && second.offset < firstEnd;
|
|
42827
|
+
}
|
|
42828
|
+
const firstEndLine = first.endLine ?? first.line;
|
|
42829
|
+
const secondEndLine = second.endLine ?? second.line;
|
|
42830
|
+
return first.line <= secondEndLine && second.line <= firstEndLine;
|
|
42831
|
+
};
|
|
42815
42832
|
const dedupeDiagnostics = (diagnostics) => {
|
|
42816
42833
|
const seenKeys = /* @__PURE__ */ new Set();
|
|
42817
42834
|
const uniqueDiagnostics = [];
|
|
@@ -42819,6 +42836,16 @@ const dedupeDiagnostics = (diagnostics) => {
|
|
|
42819
42836
|
const key = `${diagnostic.filePath}\u0000${diagnostic.line}\u0000${diagnostic.column}\u0000${diagnostic.plugin}\u0000${diagnostic.rule}\u0000${diagnostic.severity}\u0000${diagnostic.message}`;
|
|
42820
42837
|
if (seenKeys.has(key)) continue;
|
|
42821
42838
|
seenKeys.add(key);
|
|
42839
|
+
const priority = DERIVED_STATE_RULE_PRIORITY.get(diagnostic.rule);
|
|
42840
|
+
if (priority !== void 0) {
|
|
42841
|
+
const overlappingDiagnosticIndex = uniqueDiagnostics.findIndex((candidate) => candidate.rule !== diagnostic.rule && candidate.severity === diagnostic.severity && DERIVED_STATE_RULE_PRIORITY.has(candidate.rule) && doDiagnosticSpansOverlap(candidate, diagnostic));
|
|
42842
|
+
if (overlappingDiagnosticIndex >= 0) {
|
|
42843
|
+
const existingDiagnostic = uniqueDiagnostics[overlappingDiagnosticIndex];
|
|
42844
|
+
const existingPriority = existingDiagnostic ? DERIVED_STATE_RULE_PRIORITY.get(existingDiagnostic.rule) : void 0;
|
|
42845
|
+
if (existingPriority !== void 0 && priority < existingPriority) uniqueDiagnostics[overlappingDiagnosticIndex] = diagnostic;
|
|
42846
|
+
continue;
|
|
42847
|
+
}
|
|
42848
|
+
}
|
|
42822
42849
|
uniqueDiagnostics.push(diagnostic);
|
|
42823
42850
|
}
|
|
42824
42851
|
return uniqueDiagnostics;
|
|
@@ -44369,7 +44396,7 @@ const runOxlint = async (options) => {
|
|
|
44369
44396
|
};
|
|
44370
44397
|
}
|
|
44371
44398
|
};
|
|
44372
|
-
if (perFileLintCacheEnabled &&
|
|
44399
|
+
if (perFileLintCacheEnabled && !project.hasReactCompiler && extendsPaths.length === 0 && userPlugins.length === 0) {
|
|
44373
44400
|
const rulesetHash = computeRulesetHash({
|
|
44374
44401
|
config: buildConfig({
|
|
44375
44402
|
extendsPaths: [],
|
|
@@ -44377,7 +44404,8 @@ const runOxlint = async (options) => {
|
|
|
44377
44404
|
}),
|
|
44378
44405
|
toolchainVersions: resolveOxlintToolchainVersions(nodeBinaryPath),
|
|
44379
44406
|
ignorePatterns: combinedPatterns,
|
|
44380
|
-
tsconfigContent
|
|
44407
|
+
tsconfigContent,
|
|
44408
|
+
respectInlineDisables
|
|
44381
44409
|
});
|
|
44382
44410
|
const cache = createFileLintCache(resolveReactDoctorCacheDir(rootDirectory), rulesetHash);
|
|
44383
44411
|
const cacheKeyByFile = /* @__PURE__ */ new Map();
|
|
@@ -44420,7 +44448,8 @@ const runOxlint = async (options) => {
|
|
|
44420
44448
|
}),
|
|
44421
44449
|
toolchainVersions: resolveOxlintToolchainVersions(nodeBinaryPath),
|
|
44422
44450
|
ignorePatterns: combinedPatterns,
|
|
44423
|
-
tsconfigContent
|
|
44451
|
+
tsconfigContent,
|
|
44452
|
+
respectInlineDisables
|
|
44424
44453
|
})) : null;
|
|
44425
44454
|
const probeAnswers = createSidecarProbeAnswerResolver({
|
|
44426
44455
|
rootDirectory,
|
|
@@ -46638,7 +46667,7 @@ const makeNoopConsole = () => ({
|
|
|
46638
46667
|
});
|
|
46639
46668
|
//#endregion
|
|
46640
46669
|
//#region src/cli/utils/version.ts
|
|
46641
|
-
const VERSION = "0.7.5-dev.
|
|
46670
|
+
const VERSION = "0.7.5-dev.70eff9a";
|
|
46642
46671
|
//#endregion
|
|
46643
46672
|
//#region src/cli/utils/json-mode.ts
|
|
46644
46673
|
let context = null;
|
|
@@ -47007,13 +47036,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
|
|
|
47007
47036
|
* uploads source-map artifacts under, so stack frames symbolicate. Honors the
|
|
47008
47037
|
* standard `SENTRY_RELEASE` override.
|
|
47009
47038
|
*/
|
|
47010
|
-
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.7.5-dev.
|
|
47039
|
+
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.7.5-dev.70eff9a`;
|
|
47011
47040
|
/**
|
|
47012
47041
|
* Deployment environment shown in Sentry's environment filter. Defaults to
|
|
47013
47042
|
* `production` for tagged releases and `development` for dev/unbuilt versions,
|
|
47014
47043
|
* overridable via the standard `SENTRY_ENVIRONMENT` env var.
|
|
47015
47044
|
*/
|
|
47016
|
-
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.7.5-dev.
|
|
47045
|
+
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.7.5-dev.70eff9a") ? "development" : "production");
|
|
47017
47046
|
/**
|
|
47018
47047
|
* Performance-tracing sample rate in `[0, 1]`. Reads `SENTRY_TRACES_SAMPLE_RATE`
|
|
47019
47048
|
* (set to `0` to disable tracing) and falls back to
|
|
@@ -65202,4 +65231,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
|
|
|
65202
65231
|
export {};
|
|
65203
65232
|
|
|
65204
65233
|
//# sourceMappingURL=cli.js.map
|
|
65205
|
-
//# debugId=
|
|
65234
|
+
//# debugId=ed6bfef3-a274-5972-833b-77462a1156e2
|
package/dist/index.d.ts
CHANGED
|
@@ -9800,9 +9800,9 @@ interface InspectResult {
|
|
|
9800
9800
|
scanElapsedMilliseconds?: number;
|
|
9801
9801
|
/**
|
|
9802
9802
|
* Per-file lint cache outcome: files served from cache, and total files
|
|
9803
|
-
* considered. Both absent when the cache was off or bypassed (
|
|
9804
|
-
*
|
|
9805
|
-
* wide event as `lint.cacheHitRatio`.
|
|
9803
|
+
* considered. Both absent when the cache was off or bypassed (adopted
|
|
9804
|
+
* `extends`, user plugins, React Compiler). The CLI projects these onto the
|
|
9805
|
+
* Sentry wide event as `lint.cacheHitRatio`.
|
|
9806
9806
|
*/
|
|
9807
9807
|
lintCacheHitFileCount?: number | null;
|
|
9808
9808
|
lintCacheTotalFileCount?: number | null;
|
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]="1833ffea-5e6b-5c0b-af42-5334f6a8a63b")}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";
|
|
@@ -39125,7 +39125,7 @@ const normalizeConfigForHash = (config) => {
|
|
|
39125
39125
|
if (Array.isArray(clone?.jsPlugins)) clone.jsPlugins = clone.jsPlugins.map((_, index) => `<plugin:${index}>`);
|
|
39126
39126
|
return clone;
|
|
39127
39127
|
};
|
|
39128
|
-
const computeRulesetHash = (input) => crypto.createHash("sha1").update(JSON.stringify(normalizeConfigForHash(input.config))).update("\0").update([...input.toolchainVersions].join("\0")).update("\0").update([...input.ignorePatterns].join("\n")).update("\0").update(input.tsconfigContent ?? "").digest("hex");
|
|
39128
|
+
const computeRulesetHash = (input) => crypto.createHash("sha1").update(JSON.stringify(normalizeConfigForHash(input.config))).update("\0").update([...input.toolchainVersions].join("\0")).update("\0").update([...input.ignorePatterns].join("\n")).update("\0").update(input.tsconfigContent ?? "").update("\0").update(input.respectInlineDisables ? "respect-inline-disables" : "audit-mode").digest("hex");
|
|
39129
39129
|
/**
|
|
39130
39130
|
* Loads a plugin module via the local require resolver and extracts
|
|
39131
39131
|
* `(name, ruleNames)` from either `module.exports.meta + rules` or
|
|
@@ -39569,6 +39569,23 @@ const resolveTsConfigRelativePath = (rootDirectory) => {
|
|
|
39569
39569
|
for (const filename of TSCONFIG_FILENAMES) if (NFS.existsSync(Path.join(rootDirectory, filename))) return `./${filename}`;
|
|
39570
39570
|
return null;
|
|
39571
39571
|
};
|
|
39572
|
+
const DERIVED_STATE_RULE_PRIORITY = new Map([
|
|
39573
|
+
["no-initialize-state", 0],
|
|
39574
|
+
["no-adjust-state-on-prop-change", 1],
|
|
39575
|
+
["no-derived-state", 2],
|
|
39576
|
+
["no-derived-state-effect", 3]
|
|
39577
|
+
]);
|
|
39578
|
+
const doDiagnosticSpansOverlap = (first, second) => {
|
|
39579
|
+
if (first.filePath !== second.filePath || first.plugin !== second.plugin) return false;
|
|
39580
|
+
if (first.offset !== void 0 && second.offset !== void 0) {
|
|
39581
|
+
const firstEnd = first.offset + Math.max(first.length ?? 1, 1);
|
|
39582
|
+
const secondEnd = second.offset + Math.max(second.length ?? 1, 1);
|
|
39583
|
+
return first.offset < secondEnd && second.offset < firstEnd;
|
|
39584
|
+
}
|
|
39585
|
+
const firstEndLine = first.endLine ?? first.line;
|
|
39586
|
+
const secondEndLine = second.endLine ?? second.line;
|
|
39587
|
+
return first.line <= secondEndLine && second.line <= firstEndLine;
|
|
39588
|
+
};
|
|
39572
39589
|
const dedupeDiagnostics = (diagnostics) => {
|
|
39573
39590
|
const seenKeys = /* @__PURE__ */ new Set();
|
|
39574
39591
|
const uniqueDiagnostics = [];
|
|
@@ -39576,6 +39593,16 @@ const dedupeDiagnostics = (diagnostics) => {
|
|
|
39576
39593
|
const key = `${diagnostic.filePath}\u0000${diagnostic.line}\u0000${diagnostic.column}\u0000${diagnostic.plugin}\u0000${diagnostic.rule}\u0000${diagnostic.severity}\u0000${diagnostic.message}`;
|
|
39577
39594
|
if (seenKeys.has(key)) continue;
|
|
39578
39595
|
seenKeys.add(key);
|
|
39596
|
+
const priority = DERIVED_STATE_RULE_PRIORITY.get(diagnostic.rule);
|
|
39597
|
+
if (priority !== void 0) {
|
|
39598
|
+
const overlappingDiagnosticIndex = uniqueDiagnostics.findIndex((candidate) => candidate.rule !== diagnostic.rule && candidate.severity === diagnostic.severity && DERIVED_STATE_RULE_PRIORITY.has(candidate.rule) && doDiagnosticSpansOverlap(candidate, diagnostic));
|
|
39599
|
+
if (overlappingDiagnosticIndex >= 0) {
|
|
39600
|
+
const existingDiagnostic = uniqueDiagnostics[overlappingDiagnosticIndex];
|
|
39601
|
+
const existingPriority = existingDiagnostic ? DERIVED_STATE_RULE_PRIORITY.get(existingDiagnostic.rule) : void 0;
|
|
39602
|
+
if (existingPriority !== void 0 && priority < existingPriority) uniqueDiagnostics[overlappingDiagnosticIndex] = diagnostic;
|
|
39603
|
+
continue;
|
|
39604
|
+
}
|
|
39605
|
+
}
|
|
39579
39606
|
uniqueDiagnostics.push(diagnostic);
|
|
39580
39607
|
}
|
|
39581
39608
|
return uniqueDiagnostics;
|
|
@@ -41126,7 +41153,7 @@ const runOxlint = async (options) => {
|
|
|
41126
41153
|
};
|
|
41127
41154
|
}
|
|
41128
41155
|
};
|
|
41129
|
-
if (perFileLintCacheEnabled &&
|
|
41156
|
+
if (perFileLintCacheEnabled && !project.hasReactCompiler && extendsPaths.length === 0 && userPlugins.length === 0) {
|
|
41130
41157
|
const rulesetHash = computeRulesetHash({
|
|
41131
41158
|
config: buildConfig({
|
|
41132
41159
|
extendsPaths: [],
|
|
@@ -41134,7 +41161,8 @@ const runOxlint = async (options) => {
|
|
|
41134
41161
|
}),
|
|
41135
41162
|
toolchainVersions: resolveOxlintToolchainVersions(nodeBinaryPath),
|
|
41136
41163
|
ignorePatterns: combinedPatterns,
|
|
41137
|
-
tsconfigContent
|
|
41164
|
+
tsconfigContent,
|
|
41165
|
+
respectInlineDisables
|
|
41138
41166
|
});
|
|
41139
41167
|
const cache = createFileLintCache(resolveReactDoctorCacheDir(rootDirectory), rulesetHash);
|
|
41140
41168
|
const cacheKeyByFile = /* @__PURE__ */ new Map();
|
|
@@ -41177,7 +41205,8 @@ const runOxlint = async (options) => {
|
|
|
41177
41205
|
}),
|
|
41178
41206
|
toolchainVersions: resolveOxlintToolchainVersions(nodeBinaryPath),
|
|
41179
41207
|
ignorePatterns: combinedPatterns,
|
|
41180
|
-
tsconfigContent
|
|
41208
|
+
tsconfigContent,
|
|
41209
|
+
respectInlineDisables
|
|
41181
41210
|
})) : null;
|
|
41182
41211
|
const probeAnswers = createSidecarProbeAnswerResolver({
|
|
41183
41212
|
rootDirectory,
|
|
@@ -43181,4 +43210,4 @@ const toJsonReport = (result, options) => buildJsonReport({
|
|
|
43181
43210
|
export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, hasReactRuntime, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
|
|
43182
43211
|
|
|
43183
43212
|
//# sourceMappingURL=index.js.map
|
|
43184
|
-
//# debugId=
|
|
43213
|
+
//# debugId=1833ffea-5e6b-5c0b-af42-5334f6a8a63b
|
package/dist/lsp.js
CHANGED
|
@@ -39103,7 +39103,7 @@ const normalizeConfigForHash = (config) => {
|
|
|
39103
39103
|
if (Array.isArray(clone?.jsPlugins)) clone.jsPlugins = clone.jsPlugins.map((_, index) => `<plugin:${index}>`);
|
|
39104
39104
|
return clone;
|
|
39105
39105
|
};
|
|
39106
|
-
const computeRulesetHash = (input) => crypto.createHash("sha1").update(JSON.stringify(normalizeConfigForHash(input.config))).update("\0").update([...input.toolchainVersions].join("\0")).update("\0").update([...input.ignorePatterns].join("\n")).update("\0").update(input.tsconfigContent ?? "").digest("hex");
|
|
39106
|
+
const computeRulesetHash = (input) => crypto.createHash("sha1").update(JSON.stringify(normalizeConfigForHash(input.config))).update("\0").update([...input.toolchainVersions].join("\0")).update("\0").update([...input.ignorePatterns].join("\n")).update("\0").update(input.tsconfigContent ?? "").update("\0").update(input.respectInlineDisables ? "respect-inline-disables" : "audit-mode").digest("hex");
|
|
39107
39107
|
/**
|
|
39108
39108
|
* Loads a plugin module via the local require resolver and extracts
|
|
39109
39109
|
* `(name, ruleNames)` from either `module.exports.meta + rules` or
|
|
@@ -39547,6 +39547,23 @@ const resolveTsConfigRelativePath = (rootDirectory) => {
|
|
|
39547
39547
|
for (const filename of TSCONFIG_FILENAMES) if (NFS.existsSync(Path.join(rootDirectory, filename))) return `./${filename}`;
|
|
39548
39548
|
return null;
|
|
39549
39549
|
};
|
|
39550
|
+
const DERIVED_STATE_RULE_PRIORITY = new Map([
|
|
39551
|
+
["no-initialize-state", 0],
|
|
39552
|
+
["no-adjust-state-on-prop-change", 1],
|
|
39553
|
+
["no-derived-state", 2],
|
|
39554
|
+
["no-derived-state-effect", 3]
|
|
39555
|
+
]);
|
|
39556
|
+
const doDiagnosticSpansOverlap = (first, second) => {
|
|
39557
|
+
if (first.filePath !== second.filePath || first.plugin !== second.plugin) return false;
|
|
39558
|
+
if (first.offset !== void 0 && second.offset !== void 0) {
|
|
39559
|
+
const firstEnd = first.offset + Math.max(first.length ?? 1, 1);
|
|
39560
|
+
const secondEnd = second.offset + Math.max(second.length ?? 1, 1);
|
|
39561
|
+
return first.offset < secondEnd && second.offset < firstEnd;
|
|
39562
|
+
}
|
|
39563
|
+
const firstEndLine = first.endLine ?? first.line;
|
|
39564
|
+
const secondEndLine = second.endLine ?? second.line;
|
|
39565
|
+
return first.line <= secondEndLine && second.line <= firstEndLine;
|
|
39566
|
+
};
|
|
39550
39567
|
const dedupeDiagnostics = (diagnostics) => {
|
|
39551
39568
|
const seenKeys = /* @__PURE__ */ new Set();
|
|
39552
39569
|
const uniqueDiagnostics = [];
|
|
@@ -39554,6 +39571,16 @@ const dedupeDiagnostics = (diagnostics) => {
|
|
|
39554
39571
|
const key = `${diagnostic.filePath}\u0000${diagnostic.line}\u0000${diagnostic.column}\u0000${diagnostic.plugin}\u0000${diagnostic.rule}\u0000${diagnostic.severity}\u0000${diagnostic.message}`;
|
|
39555
39572
|
if (seenKeys.has(key)) continue;
|
|
39556
39573
|
seenKeys.add(key);
|
|
39574
|
+
const priority = DERIVED_STATE_RULE_PRIORITY.get(diagnostic.rule);
|
|
39575
|
+
if (priority !== void 0) {
|
|
39576
|
+
const overlappingDiagnosticIndex = uniqueDiagnostics.findIndex((candidate) => candidate.rule !== diagnostic.rule && candidate.severity === diagnostic.severity && DERIVED_STATE_RULE_PRIORITY.has(candidate.rule) && doDiagnosticSpansOverlap(candidate, diagnostic));
|
|
39577
|
+
if (overlappingDiagnosticIndex >= 0) {
|
|
39578
|
+
const existingDiagnostic = uniqueDiagnostics[overlappingDiagnosticIndex];
|
|
39579
|
+
const existingPriority = existingDiagnostic ? DERIVED_STATE_RULE_PRIORITY.get(existingDiagnostic.rule) : void 0;
|
|
39580
|
+
if (existingPriority !== void 0 && priority < existingPriority) uniqueDiagnostics[overlappingDiagnosticIndex] = diagnostic;
|
|
39581
|
+
continue;
|
|
39582
|
+
}
|
|
39583
|
+
}
|
|
39557
39584
|
uniqueDiagnostics.push(diagnostic);
|
|
39558
39585
|
}
|
|
39559
39586
|
return uniqueDiagnostics;
|
|
@@ -41104,7 +41131,7 @@ const runOxlint = async (options) => {
|
|
|
41104
41131
|
};
|
|
41105
41132
|
}
|
|
41106
41133
|
};
|
|
41107
|
-
if (perFileLintCacheEnabled &&
|
|
41134
|
+
if (perFileLintCacheEnabled && !project.hasReactCompiler && extendsPaths.length === 0 && userPlugins.length === 0) {
|
|
41108
41135
|
const rulesetHash = computeRulesetHash({
|
|
41109
41136
|
config: buildConfig({
|
|
41110
41137
|
extendsPaths: [],
|
|
@@ -41112,7 +41139,8 @@ const runOxlint = async (options) => {
|
|
|
41112
41139
|
}),
|
|
41113
41140
|
toolchainVersions: resolveOxlintToolchainVersions(nodeBinaryPath),
|
|
41114
41141
|
ignorePatterns: combinedPatterns,
|
|
41115
|
-
tsconfigContent
|
|
41142
|
+
tsconfigContent,
|
|
41143
|
+
respectInlineDisables
|
|
41116
41144
|
});
|
|
41117
41145
|
const cache = createFileLintCache(resolveReactDoctorCacheDir(rootDirectory), rulesetHash);
|
|
41118
41146
|
const cacheKeyByFile = /* @__PURE__ */ new Map();
|
|
@@ -41155,7 +41183,8 @@ const runOxlint = async (options) => {
|
|
|
41155
41183
|
}),
|
|
41156
41184
|
toolchainVersions: resolveOxlintToolchainVersions(nodeBinaryPath),
|
|
41157
41185
|
ignorePatterns: combinedPatterns,
|
|
41158
|
-
tsconfigContent
|
|
41186
|
+
tsconfigContent,
|
|
41187
|
+
respectInlineDisables
|
|
41159
41188
|
})) : null;
|
|
41160
41189
|
const probeAnswers = createSidecarProbeAnswerResolver({
|
|
41161
41190
|
rootDirectory,
|
|
@@ -44825,5 +44854,5 @@ const startLanguageServer = () => {
|
|
|
44825
44854
|
};
|
|
44826
44855
|
//#endregion
|
|
44827
44856
|
export { startLanguageServer };
|
|
44828
|
-
!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]="
|
|
44829
|
-
//# debugId=
|
|
44857
|
+
!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]="172df417-33ac-5881-af14-5df32c7af09c")}catch(e){}}();
|
|
44858
|
+
//# debugId=172df417-33ac-5881-af14-5df32c7af09c
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-doctor",
|
|
3
|
-
"version": "0.7.5-dev.
|
|
3
|
+
"version": "0.7.5-dev.70eff9a",
|
|
4
4
|
"description": "Your agent writes bad React. This catches it",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"accessibility",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"vscode-uri": "^3.1.0",
|
|
67
67
|
"yaml": "^2.9.0",
|
|
68
68
|
"deslop-js": "0.7.5",
|
|
69
|
-
"oxlint-plugin-react-doctor": "0.7.5-dev.
|
|
69
|
+
"oxlint-plugin-react-doctor": "0.7.5-dev.70eff9a"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@types/babel__code-frame": "^7.27.0",
|