react-doctor 0.8.1-dev.b4556e3 → 0.8.1-dev.c9f2c4b

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 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]="f6c63ef7-3eca-54f6-80d8-221d85cea09b")}catch(e){}}();
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]="c24708ed-97a3-59cc-81f7-4cf277ab29f2")}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";
@@ -37977,6 +37977,7 @@ const LEGACY_RULE_KEY_TO_NATIVE_RULE_KEY = {
37977
37977
  "react/jsx-no-new-function-as-prop": "react-doctor/jsx-no-new-function-as-prop",
37978
37978
  "react/jsx-no-new-object-as-prop": "react-doctor/jsx-no-new-object-as-prop",
37979
37979
  "react/jsx-no-script-url": "react-doctor/jsx-no-script-url",
37980
+ "react/jsx-no-target-blank": "react-doctor/jsx-no-target-blank",
37980
37981
  "react/jsx-no-undef": "react-doctor/jsx-no-undef",
37981
37982
  "react/jsx-no-useless-fragment": "react-doctor/jsx-no-useless-fragment",
37982
37983
  "react/jsx-pascal-case": "react-doctor/jsx-pascal-case",
@@ -44090,17 +44091,12 @@ const REACT_ERROR_BOUNDARY_MESSAGE = "This try/catch cannot catch errors thrown
44090
44091
  const REACT_COMPILER_IMPACT = "This component misses React Compiler's automatic memoization & re-renders more than it should";
44091
44092
  const REACT_COMPILER_ACTION = "Rewrite the flagged code so the compiler can optimize it.";
44092
44093
  const REACT_COMPILER_INCOMPATIBLE_LIBRARY_ACTION = "It's how the library works, not a bug in your code. Memoize values you pass from it into other memoized components, or suppress it with `// react-doctor-disable-next-line react-hooks-js/incompatible-library`.";
44093
- const SET_STATE_IN_EFFECT_ACTION = "Prefer deriving or initializing the value before render. If the effect must read a browser API after mount, treat this as advisory or suppress it with `// react-doctor-disable-next-line react-hooks-js/set-state-in-effect`.";
44094
44094
  const REACT_COMPILER_GENERIC_MESSAGE = `${REACT_COMPILER_IMPACT}. ${REACT_COMPILER_ACTION}`;
44095
44095
  const buildReactCompilerMessage = (reasonSummary, action = REACT_COMPILER_ACTION) => {
44096
44096
  const normalizedSummary = reasonSummary.replace(TRAILING_PERIOD_PATTERN, "");
44097
44097
  if (!normalizedSummary) return `${REACT_COMPILER_IMPACT}. ${action}`;
44098
44098
  return `${REACT_COMPILER_IMPACT}: ${normalizedSummary}. ${action}`;
44099
44099
  };
44100
- const buildSetStateInEffectMessage = (reasonSummary) => {
44101
- const normalizedSummary = reasonSummary.replace(TRAILING_PERIOD_PATTERN, "");
44102
- return `This synchronous effect update causes an extra render${normalizedSummary ? `: ${normalizedSummary}` : ""}. ${SET_STATE_IN_EFFECT_ACTION}`;
44103
- };
44104
44100
  const PLUGIN_CATEGORY_MAP = {
44105
44101
  react: "Bugs",
44106
44102
  "react-hooks": "Bugs",
@@ -44158,10 +44154,6 @@ const resolveCleanedDiagnostic = (message, help, plugin, rule, project) => {
44158
44154
  message: REACT_ERROR_BOUNDARY_MESSAGE,
44159
44155
  help: reasonDetail || help
44160
44156
  };
44161
- if (rule === "set-state-in-effect") return {
44162
- message: buildSetStateInEffectMessage(reasonSummary.trim()),
44163
- help: reasonDetail || help
44164
- };
44165
44157
  return {
44166
44158
  message: buildReactCompilerMessage(reasonSummary.trim(), rule === "incompatible-library" ? REACT_COMPILER_INCOMPATIBLE_LIBRARY_ACTION : REACT_COMPILER_ACTION),
44167
44159
  help: appendReanimatedSharedValueHint(reasonDetail || help, rule, project)
@@ -47364,7 +47356,7 @@ const makeNoopConsole = () => ({
47364
47356
  });
47365
47357
  //#endregion
47366
47358
  //#region src/cli/utils/version.ts
47367
- const VERSION = "0.8.1-dev.b4556e3";
47359
+ const VERSION = "0.8.1-dev.c9f2c4b";
47368
47360
  //#endregion
47369
47361
  //#region src/cli/utils/json-mode.ts
47370
47362
  let context = null;
@@ -47716,13 +47708,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
47716
47708
  * uploads source-map artifacts under, so stack frames symbolicate. Honors the
47717
47709
  * standard `SENTRY_RELEASE` override.
47718
47710
  */
47719
- const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.8.1-dev.b4556e3`;
47711
+ const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.8.1-dev.c9f2c4b`;
47720
47712
  /**
47721
47713
  * Deployment environment shown in Sentry's environment filter. Defaults to
47722
47714
  * `production` for tagged releases and `development` for dev/unbuilt versions,
47723
47715
  * overridable via the standard `SENTRY_ENVIRONMENT` env var.
47724
47716
  */
47725
- const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.8.1-dev.b4556e3") ? "development" : "production");
47717
+ const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.8.1-dev.c9f2c4b") ? "development" : "production");
47726
47718
  /**
47727
47719
  * Performance-tracing sample rate in `[0, 1]`. Reads `SENTRY_TRACES_SAMPLE_RATE`
47728
47720
  * (set to `0` to disable tracing) and falls back to
@@ -66402,4 +66394,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
66402
66394
  export {};
66403
66395
 
66404
66396
  //# sourceMappingURL=cli.js.map
66405
- //# debugId=f6c63ef7-3eca-54f6-80d8-221d85cea09b
66397
+ //# debugId=c24708ed-97a3-59cc-81f7-4cf277ab29f2
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]="f412a400-e7a3-5cfa-a67f-1192f6a38df2")}catch(e){}}();
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]="f645a3f8-ff1c-5f09-a174-8281db00eaa4")}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";
@@ -34784,6 +34784,7 @@ const LEGACY_RULE_KEY_TO_NATIVE_RULE_KEY = {
34784
34784
  "react/jsx-no-new-function-as-prop": "react-doctor/jsx-no-new-function-as-prop",
34785
34785
  "react/jsx-no-new-object-as-prop": "react-doctor/jsx-no-new-object-as-prop",
34786
34786
  "react/jsx-no-script-url": "react-doctor/jsx-no-script-url",
34787
+ "react/jsx-no-target-blank": "react-doctor/jsx-no-target-blank",
34787
34788
  "react/jsx-no-undef": "react-doctor/jsx-no-undef",
34788
34789
  "react/jsx-no-useless-fragment": "react-doctor/jsx-no-useless-fragment",
34789
34790
  "react/jsx-pascal-case": "react-doctor/jsx-pascal-case",
@@ -40846,17 +40847,12 @@ const REACT_ERROR_BOUNDARY_MESSAGE = "This try/catch cannot catch errors thrown
40846
40847
  const REACT_COMPILER_IMPACT = "This component misses React Compiler's automatic memoization & re-renders more than it should";
40847
40848
  const REACT_COMPILER_ACTION = "Rewrite the flagged code so the compiler can optimize it.";
40848
40849
  const REACT_COMPILER_INCOMPATIBLE_LIBRARY_ACTION = "It's how the library works, not a bug in your code. Memoize values you pass from it into other memoized components, or suppress it with `// react-doctor-disable-next-line react-hooks-js/incompatible-library`.";
40849
- const SET_STATE_IN_EFFECT_ACTION = "Prefer deriving or initializing the value before render. If the effect must read a browser API after mount, treat this as advisory or suppress it with `// react-doctor-disable-next-line react-hooks-js/set-state-in-effect`.";
40850
40850
  const REACT_COMPILER_GENERIC_MESSAGE = `${REACT_COMPILER_IMPACT}. ${REACT_COMPILER_ACTION}`;
40851
40851
  const buildReactCompilerMessage = (reasonSummary, action = REACT_COMPILER_ACTION) => {
40852
40852
  const normalizedSummary = reasonSummary.replace(TRAILING_PERIOD_PATTERN, "");
40853
40853
  if (!normalizedSummary) return `${REACT_COMPILER_IMPACT}. ${action}`;
40854
40854
  return `${REACT_COMPILER_IMPACT}: ${normalizedSummary}. ${action}`;
40855
40855
  };
40856
- const buildSetStateInEffectMessage = (reasonSummary) => {
40857
- const normalizedSummary = reasonSummary.replace(TRAILING_PERIOD_PATTERN, "");
40858
- return `This synchronous effect update causes an extra render${normalizedSummary ? `: ${normalizedSummary}` : ""}. ${SET_STATE_IN_EFFECT_ACTION}`;
40859
- };
40860
40856
  const PLUGIN_CATEGORY_MAP = {
40861
40857
  react: "Bugs",
40862
40858
  "react-hooks": "Bugs",
@@ -40914,10 +40910,6 @@ const resolveCleanedDiagnostic = (message, help, plugin, rule, project) => {
40914
40910
  message: REACT_ERROR_BOUNDARY_MESSAGE,
40915
40911
  help: reasonDetail || help
40916
40912
  };
40917
- if (rule === "set-state-in-effect") return {
40918
- message: buildSetStateInEffectMessage(reasonSummary.trim()),
40919
- help: reasonDetail || help
40920
- };
40921
40913
  return {
40922
40914
  message: buildReactCompilerMessage(reasonSummary.trim(), rule === "incompatible-library" ? REACT_COMPILER_INCOMPATIBLE_LIBRARY_ACTION : REACT_COMPILER_ACTION),
40923
40915
  help: appendReanimatedSharedValueHint(reasonDetail || help, rule, project)
@@ -43836,4 +43828,4 @@ const toJsonReport = (result, options) => buildJsonReport({
43836
43828
  export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, hasReactRuntime, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
43837
43829
 
43838
43830
  //# sourceMappingURL=index.js.map
43839
- //# debugId=f412a400-e7a3-5cfa-a67f-1192f6a38df2
43831
+ //# debugId=f645a3f8-ff1c-5f09-a174-8281db00eaa4
package/dist/lsp.js CHANGED
@@ -34836,6 +34836,7 @@ const LEGACY_RULE_KEY_TO_NATIVE_RULE_KEY = {
34836
34836
  "react/jsx-no-new-function-as-prop": "react-doctor/jsx-no-new-function-as-prop",
34837
34837
  "react/jsx-no-new-object-as-prop": "react-doctor/jsx-no-new-object-as-prop",
34838
34838
  "react/jsx-no-script-url": "react-doctor/jsx-no-script-url",
34839
+ "react/jsx-no-target-blank": "react-doctor/jsx-no-target-blank",
34839
34840
  "react/jsx-no-undef": "react-doctor/jsx-no-undef",
34840
34841
  "react/jsx-no-useless-fragment": "react-doctor/jsx-no-useless-fragment",
34841
34842
  "react/jsx-pascal-case": "react-doctor/jsx-pascal-case",
@@ -40824,17 +40825,12 @@ const REACT_ERROR_BOUNDARY_MESSAGE = "This try/catch cannot catch errors thrown
40824
40825
  const REACT_COMPILER_IMPACT = "This component misses React Compiler's automatic memoization & re-renders more than it should";
40825
40826
  const REACT_COMPILER_ACTION = "Rewrite the flagged code so the compiler can optimize it.";
40826
40827
  const REACT_COMPILER_INCOMPATIBLE_LIBRARY_ACTION = "It's how the library works, not a bug in your code. Memoize values you pass from it into other memoized components, or suppress it with `// react-doctor-disable-next-line react-hooks-js/incompatible-library`.";
40827
- const SET_STATE_IN_EFFECT_ACTION = "Prefer deriving or initializing the value before render. If the effect must read a browser API after mount, treat this as advisory or suppress it with `// react-doctor-disable-next-line react-hooks-js/set-state-in-effect`.";
40828
40828
  const REACT_COMPILER_GENERIC_MESSAGE = `${REACT_COMPILER_IMPACT}. ${REACT_COMPILER_ACTION}`;
40829
40829
  const buildReactCompilerMessage = (reasonSummary, action = REACT_COMPILER_ACTION) => {
40830
40830
  const normalizedSummary = reasonSummary.replace(TRAILING_PERIOD_PATTERN, "");
40831
40831
  if (!normalizedSummary) return `${REACT_COMPILER_IMPACT}. ${action}`;
40832
40832
  return `${REACT_COMPILER_IMPACT}: ${normalizedSummary}. ${action}`;
40833
40833
  };
40834
- const buildSetStateInEffectMessage = (reasonSummary) => {
40835
- const normalizedSummary = reasonSummary.replace(TRAILING_PERIOD_PATTERN, "");
40836
- return `This synchronous effect update causes an extra render${normalizedSummary ? `: ${normalizedSummary}` : ""}. ${SET_STATE_IN_EFFECT_ACTION}`;
40837
- };
40838
40834
  const PLUGIN_CATEGORY_MAP = {
40839
40835
  react: "Bugs",
40840
40836
  "react-hooks": "Bugs",
@@ -40892,10 +40888,6 @@ const resolveCleanedDiagnostic = (message, help, plugin, rule, project) => {
40892
40888
  message: REACT_ERROR_BOUNDARY_MESSAGE,
40893
40889
  help: reasonDetail || help
40894
40890
  };
40895
- if (rule === "set-state-in-effect") return {
40896
- message: buildSetStateInEffectMessage(reasonSummary.trim()),
40897
- help: reasonDetail || help
40898
- };
40899
40891
  return {
40900
40892
  message: buildReactCompilerMessage(reasonSummary.trim(), rule === "incompatible-library" ? REACT_COMPILER_INCOMPATIBLE_LIBRARY_ACTION : REACT_COMPILER_ACTION),
40901
40893
  help: appendReanimatedSharedValueHint(reasonDetail || help, rule, project)
@@ -45456,5 +45448,5 @@ const startLanguageServer = () => {
45456
45448
  };
45457
45449
  //#endregion
45458
45450
  export { startLanguageServer };
45459
- !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]="2e6fca06-4d93-5b9e-86fd-92bfb63393e0")}catch(e){}}();
45460
- //# debugId=2e6fca06-4d93-5b9e-86fd-92bfb63393e0
45451
+ !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]="4fa679df-c187-5989-bc8a-a96791a6f02c")}catch(e){}}();
45452
+ //# debugId=4fa679df-c187-5989-bc8a-a96791a6f02c
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-doctor",
3
- "version": "0.8.1-dev.b4556e3",
3
+ "version": "0.8.1-dev.c9f2c4b",
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
- "deslop-js": "0.8.1",
69
- "oxlint-plugin-react-doctor": "0.8.1-dev.b4556e3"
68
+ "oxlint-plugin-react-doctor": "0.8.1-dev.c9f2c4b",
69
+ "deslop-js": "0.8.1"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@types/babel__code-frame": "^7.27.0",