@r_masseater/oxlint-typed-rules 0.4.1 → 0.4.2

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.
Files changed (37) hide show
  1. package/README.md +12 -25
  2. package/dist/drizzle.d.mts +3 -3
  3. package/dist/drizzle.mjs +3 -3
  4. package/dist/drizzle.mjs.map +1 -1
  5. package/dist/{upstream-plugin-xn91RvOJ.d.mts → index-D1qDt581.d.mts} +4 -4
  6. package/dist/index.d.mts +4 -4
  7. package/dist/index.mjs +1 -1
  8. package/dist/react.d.mts +5 -5
  9. package/dist/react.mjs +158 -104
  10. package/dist/react.mjs.map +1 -1
  11. package/dist/remotion.d.mts +3 -3
  12. package/dist/remotion.mjs +4 -4
  13. package/dist/remotion.mjs.map +1 -1
  14. package/dist/tanstack-query.d.mts +3 -3
  15. package/dist/tanstack-query.mjs +4 -4
  16. package/dist/tanstack-query.mjs.map +1 -1
  17. package/dist/tanstack-router.d.mts +3 -3
  18. package/dist/tanstack-router.mjs +3 -3
  19. package/dist/tanstack-router.mjs.map +1 -1
  20. package/dist/tanstack-start.mjs +4 -4
  21. package/dist/tanstack-start.mjs.map +1 -1
  22. package/dist/{ts-compat-kqrVqnFj.mjs → ts-compat-CFDky9Ie.mjs} +3 -3
  23. package/dist/ts-compat-CFDky9Ie.mjs.map +1 -0
  24. package/dist/{typed-rule-DljA66d1.mjs → typed-rule-DFpV2XgE.mjs} +63 -63
  25. package/dist/typed-rule-DFpV2XgE.mjs.map +1 -0
  26. package/dist/{typescript-eslint-utils-DRyGbBR9.mjs → typescript-eslint-utils-BMYUCcJU.mjs} +2 -2
  27. package/dist/typescript-eslint-utils-BMYUCcJU.mjs.map +1 -0
  28. package/dist/{upstream-plugin-B_PNfSLV.mjs → upstream-plugin-D4Lz9A1H.mjs} +5 -4
  29. package/dist/upstream-plugin-D4Lz9A1H.mjs.map +1 -0
  30. package/package.json +18 -16
  31. package/skills/run-typed-eslint-rules/SKILL.md +85 -0
  32. package/dist/config-rules-CIyMUUvG.mjs +0 -6
  33. package/dist/config-rules-CIyMUUvG.mjs.map +0 -1
  34. package/dist/ts-compat-kqrVqnFj.mjs.map +0 -1
  35. package/dist/typed-rule-DljA66d1.mjs.map +0 -1
  36. package/dist/typescript-eslint-utils-DRyGbBR9.mjs.map +0 -1
  37. package/dist/upstream-plugin-B_PNfSLV.mjs.map +0 -1
package/dist/react.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import { a as __toESM, t as __commonJSMin } from "./rolldown-runtime-DQp2zzRu.mjs";
2
2
  import { n as require_dist$2, t as require_eslint_utils$2 } from "./eslint-utils-BmbvsYwn.mjs";
3
- import { m as ts } from "./ts-compat-kqrVqnFj.mjs";
4
- import { t as rulesOf } from "./config-rules-CIyMUUvG.mjs";
5
- import { a as withTypeInformation, i as withOptionalTypeInformation, t as isTypedRule } from "./typed-rule-DljA66d1.mjs";
3
+ import { m as ts } from "./ts-compat-CFDky9Ie.mjs";
4
+ import { a as withTypeInformation, i as withOptionalTypeInformation, t as isTypedRule } from "./typed-rule-DFpV2XgE.mjs";
5
+ import { r as rulesOf } from "./upstream-plugin-D4Lz9A1H.mjs";
6
6
  import module$1 from "node:module";
7
7
  import { Array as Array$1, Option, Record, String as String$1, pipe } from "effect";
8
8
  import path from "node:path";
@@ -5238,7 +5238,7 @@ function refine(fn, _params = {}) {
5238
5238
  function superRefine(fn, params) {
5239
5239
  return /* @__PURE__ */ _superRefine(fn, params);
5240
5240
  }
5241
- // ../../node_modules/.pnpm/@eslint-react+shared@5.30.1_eslint@10.14.0_jiti@2.7.0_supports-color@10.2.2__supports-color@10.2.2_typescript@7.1.0-beta/node_modules/@eslint-react/shared/dist/index.js
5241
+ // ../../node_modules/.pnpm/@eslint-react+shared@5.30.2_eslint@10.14.0_jiti@2.7.0_supports-color@10.2.2__supports-color@10.2.2_typescript@7.1.0-beta/node_modules/@eslint-react/shared/dist/index.js
5242
5242
  const pipeArguments$8 = (self, args) => {
5243
5243
  switch (args.length) {
5244
5244
  case 0: return self;
@@ -5409,7 +5409,7 @@ const getNormalizedSettings = memoize$1((settings) => normalizeSettings(decodeSe
5409
5409
  function getSettingsFromContext(context) {
5410
5410
  return getNormalizedSettings(context.settings["react-x"]);
5411
5411
  }
5412
- // ../../node_modules/.pnpm/@eslint-react+ast@5.30.1_eslint@10.14.0_jiti@2.7.0_supports-color@10.2.2__supports-color@10.2.2_typescript@7.1.0-beta/node_modules/@eslint-react/ast/dist/rolldown-runtime-D3KUYPsf.js
5412
+ // ../../node_modules/.pnpm/@eslint-react+ast@5.30.2_eslint@10.14.0_jiti@2.7.0_supports-color@10.2.2__supports-color@10.2.2_typescript@7.1.0-beta/node_modules/@eslint-react/ast/dist/rolldown-runtime-D3KUYPsf.js
5413
5413
  var import_eslint_utils = /* @__PURE__ */ __toESM(require_eslint_utils$2(), 1);
5414
5414
  var __defProp$7 = Object.defineProperty;
5415
5415
  var __exportAll$7 = (all, flags) => {
@@ -8446,7 +8446,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
8446
8446
  }
8447
8447
  });
8448
8448
  }));
8449
- // ../../node_modules/.pnpm/@eslint-react+ast@5.30.1_eslint@10.14.0_jiti@2.7.0_supports-color@10.2.2__supports-color@10.2.2_typescript@7.1.0-beta/node_modules/@eslint-react/ast/dist/index.js
8449
+ // ../../node_modules/.pnpm/@eslint-react+ast@5.30.2_eslint@10.14.0_jiti@2.7.0_supports-color@10.2.2__supports-color@10.2.2_typescript@7.1.0-beta/node_modules/@eslint-react/ast/dist/index.js
8450
8450
  var import_dist$1 = require_dist$2();
8451
8451
  var import_ast_utils = /* @__PURE__ */ __toESM(require_ast_utils(), 1);
8452
8452
  var import_dist$2 = require_dist$1();
@@ -9084,7 +9084,7 @@ function isUnconditionallyTerminating(node) {
9084
9084
  default: return false;
9085
9085
  }
9086
9086
  }
9087
- // ../../node_modules/.pnpm/@eslint-react+eslint@5.30.1_eslint@10.14.0_jiti@2.7.0_supports-color@10.2.2__supports-color@10.2.2_typescript@7.1.0-beta/node_modules/@eslint-react/eslint/dist/index.js
9087
+ // ../../node_modules/.pnpm/@eslint-react+eslint@5.30.2_eslint@10.14.0_jiti@2.7.0_supports-color@10.2.2__supports-color@10.2.2_typescript@7.1.0-beta/node_modules/@eslint-react/eslint/dist/index.js
9088
9088
  function getDocsUrl$6(ruleName) {
9089
9089
  return `https://eslint-react.xyz/docs/rules/${ruleName}`;
9090
9090
  }
@@ -9113,7 +9113,7 @@ function merge(base, ...rest) {
9113
9113
  }
9114
9114
  return base;
9115
9115
  }
9116
- // ../../node_modules/.pnpm/@eslint-react+jsx@5.30.1_eslint@10.14.0_jiti@2.7.0_supports-color@10.2.2__supports-color@10.2.2_typescript@7.1.0-beta/node_modules/@eslint-react/jsx/dist/index.js
9116
+ // ../../node_modules/.pnpm/@eslint-react+jsx@5.30.2_eslint@10.14.0_jiti@2.7.0_supports-color@10.2.2__supports-color@10.2.2_typescript@7.1.0-beta/node_modules/@eslint-react/jsx/dist/index.js
9117
9117
  const pipeArguments$6 = (self, args) => {
9118
9118
  switch (args.length) {
9119
9119
  case 0: return self;
@@ -16567,7 +16567,7 @@ var require_analyze = /* @__PURE__ */ __commonJSMin(((exports) => {
16567
16567
  return scopeManager;
16568
16568
  }
16569
16569
  }));
16570
- // ../../node_modules/.pnpm/@eslint-react+var@5.30.1_eslint@10.14.0_jiti@2.7.0_supports-color@10.2.2__supports-color@10.2.2_typescript@7.1.0-beta/node_modules/@eslint-react/var/dist/index.js
16570
+ // ../../node_modules/.pnpm/@eslint-react+var@5.30.2_eslint@10.14.0_jiti@2.7.0_supports-color@10.2.2__supports-color@10.2.2_typescript@7.1.0-beta/node_modules/@eslint-react/var/dist/index.js
16571
16571
  var import_dist = (/* @__PURE__ */ __commonJSMin(((exports, module, this$2) => {
16572
16572
  var __createBinding = this$2 && this$2.__createBinding || (Object.create ? (function(o, m, k, k2) {
16573
16573
  if (k2 === void 0) k2 = k;
@@ -17167,7 +17167,7 @@ function resolveOriginChain(context, node, options) {
17167
17167
  }
17168
17168
  return check_exports.isIdentifier(current) ? null : current;
17169
17169
  }
17170
- // ../../node_modules/.pnpm/@eslint-react+core@5.30.1_eslint@10.14.0_jiti@2.7.0_supports-color@10.2.2__supports-color@10.2.2_typescript@7.1.0-beta/node_modules/@eslint-react/core/dist/index.js
17170
+ // ../../node_modules/.pnpm/@eslint-react+core@5.30.2_eslint@10.14.0_jiti@2.7.0_supports-color@10.2.2__supports-color@10.2.2_typescript@7.1.0-beta/node_modules/@eslint-react/core/dist/index.js
17171
17171
  function isAPI(api) {
17172
17172
  function impl(context, node) {
17173
17173
  if (node == null) return false;
@@ -18021,7 +18021,7 @@ function getTypeVariants(types) {
18021
18021
  if (types.some(isNeverType)) variants.add("never");
18022
18022
  return variants;
18023
18023
  }
18024
- // src/ts-api-utils.ts
18024
+ // src/shared/lib/ts-api-utils.ts
18025
18025
  var import_umd = (/* @__PURE__ */ __commonJSMin(((exports, module, this$1) => {
18026
18026
  (function(global, factory) {
18027
18027
  typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.compareVersions = {}));
@@ -18239,7 +18239,7 @@ function delimiterCase(str, delimiter) {
18239
18239
  function snakeCase(str) {
18240
18240
  return toLowerCase(delimiterCase(removeApostrophe(str), "_"));
18241
18241
  }
18242
- // ../../node_modules/.pnpm/eslint-plugin-react-x@5.30.1_eslint@10.14.0_jiti@2.7.0_supports-color@10.2.2__supports-_ff0cd712a775bab23e34d6e08feb282a/node_modules/eslint-plugin-react-x/dist/index.js
18242
+ // ../../node_modules/.pnpm/eslint-plugin-react-x@5.30.2_eslint@10.14.0_jiti@2.7.0_supports-color@10.2.2__supports-_1b484451621431e382f4b5da14efa96a/node_modules/eslint-plugin-react-x/dist/index.js
18243
18243
  var __defProp$6 = Object.defineProperty;
18244
18244
  var __exportAll$6 = (all, flags) => {
18245
18245
  let target = Object.setPrototypeOf({}, null);
@@ -18350,7 +18350,7 @@ const rules$6$6 = {
18350
18350
  "react-x/no-unused-props": "off"
18351
18351
  };
18352
18352
  var name$6$6 = "eslint-plugin-react-x";
18353
- var version$6 = "5.30.1";
18353
+ var version$6 = "5.30.2";
18354
18354
  function getDocsUrl$5(ruleName) {
18355
18355
  return `https://eslint-react.xyz/docs/rules/${ruleName}`;
18356
18356
  }
@@ -26093,7 +26093,7 @@ const finalPlugin$6 = {
26093
26093
  ["strict-typescript"]: createConfig$6(strict_typescript_exports$2)
26094
26094
  }
26095
26095
  };
26096
- // ../../node_modules/.pnpm/eslint-plugin-react-dom@5.30.1_eslint@10.14.0_jiti@2.7.0_supports-color@10.2.2__support_20410a056551a37105397f0e3930080e/node_modules/eslint-plugin-react-dom/dist/index.js
26096
+ // ../../node_modules/.pnpm/eslint-plugin-react-dom@5.30.2_eslint@10.14.0_jiti@2.7.0_supports-color@10.2.2__support_dc03e559deb7e542db8f73bcf9517353/node_modules/eslint-plugin-react-dom/dist/index.js
26097
26097
  var __defProp$5 = Object.defineProperty;
26098
26098
  var __exportAll$5 = (all, flags) => {
26099
26099
  let target = Object.setPrototypeOf({}, null);
@@ -26105,7 +26105,7 @@ var __exportAll$5 = (all, flags) => {
26105
26105
  return flags & 2 ? target : Object.preventExtensions(target);
26106
26106
  };
26107
26107
  var name$2$25 = "eslint-plugin-react-dom";
26108
- var version$5 = "5.30.1";
26108
+ var version$5 = "5.30.2";
26109
26109
  function getDocsUrl$4(ruleName) {
26110
26110
  return `https://eslint-react.xyz/docs/rules/dom-${ruleName}`;
26111
26111
  }
@@ -28494,7 +28494,7 @@ function decodeHtmlText(input, mode) {
28494
28494
  function decodeHTMLStrict(htmlString) {
28495
28495
  return decodeHtmlText(htmlString, DecodingMode.Strict);
28496
28496
  }
28497
- // ../../node_modules/.pnpm/eslint-plugin-react-jsx@5.30.1_patch_hash=b992c01baefacc91e5b12432715428f4c3ec7bc2494b0_a241b37dc6a9ed5bdb6fa8f8ff3a2168/node_modules/eslint-plugin-react-jsx/dist/index.js
28497
+ // ../../node_modules/.pnpm/eslint-plugin-react-jsx@5.30.2_patch_hash=b992c01baefacc91e5b12432715428f4c3ec7bc2494b0_97ae1a8ade1472cbd37ecf2bee39b8a8/node_modules/eslint-plugin-react-jsx/dist/index.js
28498
28498
  var __defProp$4 = Object.defineProperty;
28499
28499
  var __exportAll$4 = (all, flags) => {
28500
28500
  let target = Object.setPrototypeOf({}, null);
@@ -28506,7 +28506,7 @@ var __exportAll$4 = (all, flags) => {
28506
28506
  return flags & 2 ? target : Object.preventExtensions(target);
28507
28507
  };
28508
28508
  var name$2$23 = "eslint-plugin-react-jsx";
28509
- var version$4 = "5.30.1";
28509
+ var version$4 = "5.30.2";
28510
28510
  function getDocsUrl$3(ruleName) {
28511
28511
  return `https://eslint-react.xyz/docs/rules/jsx-${ruleName}`;
28512
28512
  }
@@ -29049,7 +29049,7 @@ const finalPlugin$4 = {
29049
29049
  ["strict"]: createConfig$4(strict_exports$2)
29050
29050
  }
29051
29051
  };
29052
- // ../../node_modules/.pnpm/eslint-plugin-react-naming-convention@5.30.1_eslint@10.14.0_jiti@2.7.0_supports-color@1_6741a21c6560d52510870b3510d9bdc5/node_modules/eslint-plugin-react-naming-convention/dist/index.js
29052
+ // ../../node_modules/.pnpm/eslint-plugin-react-naming-convention@5.30.2_eslint@10.14.0_jiti@2.7.0_supports-color@1_a9e86a7a66751689f3a2f8ea3f5ade08/node_modules/eslint-plugin-react-naming-convention/dist/index.js
29053
29053
  var __defProp$3 = Object.defineProperty;
29054
29054
  var __exportAll$3 = (all, flags) => {
29055
29055
  let target = Object.setPrototypeOf({}, null);
@@ -29061,7 +29061,7 @@ var __exportAll$3 = (all, flags) => {
29061
29061
  return flags & 2 ? target : Object.preventExtensions(target);
29062
29062
  };
29063
29063
  var name$1$28 = "eslint-plugin-react-naming-convention";
29064
- var version$3 = "5.30.1";
29064
+ var version$3 = "5.30.2";
29065
29065
  function getDocsUrl$2(ruleName) {
29066
29066
  return `https://eslint-react.xyz/docs/rules/naming-convention-${ruleName}`;
29067
29067
  }
@@ -29238,7 +29238,7 @@ const finalPlugin$3 = {
29238
29238
  ...plugin$4,
29239
29239
  configs: { ["recommended"]: createConfig$3(recommended_exports$3) }
29240
29240
  };
29241
- // ../../node_modules/.pnpm/eslint-plugin-react-rsc@5.30.1_eslint@10.14.0_jiti@2.7.0_supports-color@10.2.2__support_f6e2f13ed7741fa73386428dfd02348a/node_modules/eslint-plugin-react-rsc/dist/index.js
29241
+ // ../../node_modules/.pnpm/eslint-plugin-react-rsc@5.30.2_eslint@10.14.0_jiti@2.7.0_supports-color@10.2.2__support_e14290670e3f12ade5f70a357bc32123/node_modules/eslint-plugin-react-rsc/dist/index.js
29242
29242
  var __defProp$2 = Object.defineProperty;
29243
29243
  var __exportAll$2 = (all, flags) => {
29244
29244
  let target = Object.setPrototypeOf({}, null);
@@ -29256,7 +29256,7 @@ var disable_experimental_exports$1 = /* @__PURE__ */ __exportAll$2({
29256
29256
  const name$5$2 = "react-rsc/disable-experimental";
29257
29257
  const rules$4$2 = { "react-rsc/function-definition": "off" };
29258
29258
  var name$4$2 = "eslint-plugin-react-rsc";
29259
- var version$2 = "5.30.1";
29259
+ var version$2 = "5.30.2";
29260
29260
  function getDocsUrl$1(ruleName) {
29261
29261
  return `https://eslint-react.xyz/docs/rules/rsc-${ruleName}`;
29262
29262
  }
@@ -29841,7 +29841,7 @@ const finalPlugin$2 = {
29841
29841
  ["strict-typescript"]: createConfig$2(strict_typescript_exports$1)
29842
29842
  }
29843
29843
  };
29844
- // ../../node_modules/.pnpm/eslint-plugin-react-web-api@5.30.1_eslint@10.14.0_jiti@2.7.0_supports-color@10.2.2__sup_ef864f37a8ff39ee69553f3e09e5a334/node_modules/eslint-plugin-react-web-api/dist/index.js
29844
+ // ../../node_modules/.pnpm/eslint-plugin-react-web-api@5.30.2_eslint@10.14.0_jiti@2.7.0_supports-color@10.2.2__sup_79c13ffded8ad6cfc917cedd024fca93/node_modules/eslint-plugin-react-web-api/dist/index.js
29845
29845
  var __defProp$1 = Object.defineProperty;
29846
29846
  var __exportAll$1 = (all, flags) => {
29847
29847
  let target = Object.setPrototypeOf({}, null);
@@ -29853,7 +29853,7 @@ var __exportAll$1 = (all, flags) => {
29853
29853
  return flags & 2 ? target : Object.preventExtensions(target);
29854
29854
  };
29855
29855
  var name$1$1 = "eslint-plugin-react-web-api";
29856
- var version$1 = "5.30.1";
29856
+ var version$1 = "5.30.2";
29857
29857
  function getDocsUrl(ruleName) {
29858
29858
  return `https://eslint-react.xyz/docs/rules/web-api-${ruleName}`;
29859
29859
  }
@@ -29970,14 +29970,14 @@ function getCallKind$5(node) {
29970
29970
  if (name != null && u$1(z$1.union("addEventListener", "removeEventListener"))(name)) return name;
29971
29971
  return "other";
29972
29972
  }
29973
- function isGlobalObject(node) {
29973
+ function isGlobalObject$1(node) {
29974
29974
  return check_exports.isIdentifier(node) && (node.name === "window" || node.name === "globalThis" || node.name === "self");
29975
29975
  }
29976
29976
  function isSameObject(a, b, isEqual = compare_exports.isEqual) {
29977
29977
  switch (true) {
29978
29978
  case a.type === import_dist$1.AST_NODE_TYPES.MemberExpression && b.type === import_dist$1.AST_NODE_TYPES.MemberExpression: return isEqual(a.object, b.object);
29979
- case a.type === import_dist$1.AST_NODE_TYPES.MemberExpression: return isGlobalObject(a.object);
29980
- case b.type === import_dist$1.AST_NODE_TYPES.MemberExpression: return isGlobalObject(b.object);
29979
+ case a.type === import_dist$1.AST_NODE_TYPES.MemberExpression: return isGlobalObject$1(a.object);
29980
+ case b.type === import_dist$1.AST_NODE_TYPES.MemberExpression: return isGlobalObject$1(b.object);
29981
29981
  default: return true;
29982
29982
  }
29983
29983
  }
@@ -30287,83 +30287,56 @@ function resolveToObjectExpression(context, node) {
30287
30287
  default: return null;
30288
30288
  }
30289
30289
  }
30290
- const RULE_NAME$4 = "no-leaked-fetch";
30291
- const isUseEffectCallback$4 = or(isUseEffectSetupCallback, isUseEffectCleanupCallback);
30292
- function getCallKind$4(node) {
30293
- const name = extract_exports.getCalleeName(node);
30294
- if (name != null && u$1(z$1.union("fetch", "abort"))(name)) return name;
30295
- return "other";
30290
+ function isGlobalObject(node) {
30291
+ return check_exports.isIdentifier(node) && (node.name === "window" || node.name === "globalThis" || node.name === "self");
30296
30292
  }
30297
- function getControllerFromSignal(context, node, seen = /* @__PURE__ */ new Set()) {
30298
- node = extract_exports.unwrap(node);
30293
+ function isNameBoundInEnclosingScopes(name, node) {
30294
+ let current = node.parent;
30295
+ while (current != null) {
30296
+ if (scopeBindsName(current, name)) return true;
30297
+ current = current.parent;
30298
+ }
30299
+ return false;
30300
+ }
30301
+ function scopeBindsName(node, name) {
30299
30302
  switch (node.type) {
30300
- case import_dist$1.AST_NODE_TYPES.MemberExpression: return {
30301
- controller: node.object,
30302
- isParamSignal: false
30303
- };
30304
- case import_dist$1.AST_NODE_TYPES.Identifier: {
30305
- if (seen.has(node)) return {
30306
- controller: null,
30307
- isParamSignal: false
30308
- };
30309
- seen.add(node);
30310
- const resolved = resolveOrigin(context, node);
30311
- const resolvedUnwrapped = resolved == null ? null : extract_exports.unwrap(resolved);
30312
- if (resolvedUnwrapped?.type === import_dist$1.AST_NODE_TYPES.MemberExpression) return {
30313
- controller: resolvedUnwrapped.object,
30314
- isParamSignal: false
30315
- };
30316
- if (resolved != null && check_exports.isFunction(resolved)) return {
30317
- controller: node,
30318
- isParamSignal: true
30319
- };
30320
- if (resolvedUnwrapped != null) return getControllerFromSignal(context, resolvedUnwrapped, seen);
30321
- return {
30322
- controller: null,
30323
- isParamSignal: false
30324
- };
30325
- }
30326
- default: return {
30327
- controller: null,
30328
- isParamSignal: false
30329
- };
30303
+ case import_dist$1.AST_NODE_TYPES.FunctionDeclaration:
30304
+ case import_dist$1.AST_NODE_TYPES.ArrowFunctionExpression: return node.params.some((param) => patternBindsName(param, name));
30305
+ case import_dist$1.AST_NODE_TYPES.FunctionExpression: return node.id?.name === name || node.params.some((param) => patternBindsName(param, name));
30306
+ case import_dist$1.AST_NODE_TYPES.CatchClause: return node.param != null && patternBindsName(node.param, name);
30307
+ case import_dist$1.AST_NODE_TYPES.BlockStatement:
30308
+ case import_dist$1.AST_NODE_TYPES.Program:
30309
+ case import_dist$1.AST_NODE_TYPES.StaticBlock: return node.body.some((statement) => statementBindsName(statement, name));
30310
+ case import_dist$1.AST_NODE_TYPES.ForStatement: return node.init?.type === import_dist$1.AST_NODE_TYPES.VariableDeclaration && statementBindsName(node.init, name);
30311
+ case import_dist$1.AST_NODE_TYPES.ForInStatement:
30312
+ case import_dist$1.AST_NODE_TYPES.ForOfStatement: return node.left.type === import_dist$1.AST_NODE_TYPES.VariableDeclaration && statementBindsName(node.left, name);
30313
+ default: return false;
30330
30314
  }
30331
30315
  }
30332
- function getFetchController(context, node) {
30333
- const [, optionsArg] = node.arguments;
30334
- if (optionsArg == null) return {
30335
- controller: null,
30336
- isParamSignal: false
30337
- };
30338
- const options = resolveToObjectExpression(context, optionsArg);
30339
- if (options == null) return {
30340
- controller: null,
30341
- isParamSignal: false
30342
- };
30343
- const findSignal = (properties) => {
30344
- for (const property of properties) {
30345
- if (property.type === import_dist$1.AST_NODE_TYPES.Property) {
30346
- const key = extract_exports.unwrap(property.key);
30347
- if ((!property.computed && check_exports.isIdentifier(key) ? key.name : key.type === import_dist$1.AST_NODE_TYPES.Literal && typeof key.value === "string" ? key.value : key.type === import_dist$1.AST_NODE_TYPES.TemplateLiteral && key.expressions.length === 0 ? key.quasis[0]?.value.cooked ?? key.quasis[0]?.value.raw ?? null : null) === "signal") return property;
30348
- }
30349
- if (property.type === import_dist$1.AST_NODE_TYPES.SpreadElement && property.argument.type === import_dist$1.AST_NODE_TYPES.ObjectExpression) {
30350
- const found = findSignal(property.argument.properties);
30351
- if (found != null) return found;
30352
- }
30353
- }
30354
- return null;
30355
- };
30356
- const signalProp = findSignal(options.properties);
30357
- if (signalProp?.type !== import_dist$1.AST_NODE_TYPES.Property) return {
30358
- controller: null,
30359
- isParamSignal: false
30360
- };
30361
- return getControllerFromSignal(context, signalProp.value);
30316
+ function statementBindsName(statement, name) {
30317
+ switch (statement.type) {
30318
+ case import_dist$1.AST_NODE_TYPES.FunctionDeclaration:
30319
+ case import_dist$1.AST_NODE_TYPES.ClassDeclaration: return statement.id?.name === name;
30320
+ case import_dist$1.AST_NODE_TYPES.VariableDeclaration: return statement.declarations.some((declarator) => patternBindsName(declarator.id, name));
30321
+ case import_dist$1.AST_NODE_TYPES.ImportDeclaration: return statement.specifiers.some((specifier) => specifier.local.name === name);
30322
+ case import_dist$1.AST_NODE_TYPES.ExportNamedDeclaration: return statement.declaration != null && statementBindsName(statement.declaration, name);
30323
+ case import_dist$1.AST_NODE_TYPES.ExportDefaultDeclaration: return (statement.declaration.type === import_dist$1.AST_NODE_TYPES.FunctionDeclaration || statement.declaration.type === import_dist$1.AST_NODE_TYPES.ClassDeclaration) && statement.declaration.id?.name === name;
30324
+ case import_dist$1.AST_NODE_TYPES.TSImportEqualsDeclaration:
30325
+ case import_dist$1.AST_NODE_TYPES.TSEnumDeclaration: return statement.id.name === name;
30326
+ case import_dist$1.AST_NODE_TYPES.TSModuleDeclaration: return statement.id.type === import_dist$1.AST_NODE_TYPES.Identifier && statement.id.name === name;
30327
+ default: return false;
30328
+ }
30362
30329
  }
30363
- function getAbortController(node) {
30364
- const callee = extract_exports.unwrap(node.callee);
30365
- if (callee.type === import_dist$1.AST_NODE_TYPES.MemberExpression) return callee.object;
30366
- return null;
30330
+ function patternBindsName(pattern, name) {
30331
+ switch (pattern.type) {
30332
+ case import_dist$1.AST_NODE_TYPES.Identifier: return pattern.name === name;
30333
+ case import_dist$1.AST_NODE_TYPES.ArrayPattern: return pattern.elements.some((element) => element != null && patternBindsName(element, name));
30334
+ case import_dist$1.AST_NODE_TYPES.ObjectPattern: return pattern.properties.some((property) => property.type === import_dist$1.AST_NODE_TYPES.RestElement ? patternBindsName(property.argument, name) : patternBindsName(property.value, name));
30335
+ case import_dist$1.AST_NODE_TYPES.AssignmentPattern: return patternBindsName(pattern.left, name);
30336
+ case import_dist$1.AST_NODE_TYPES.RestElement: return patternBindsName(pattern.argument, name);
30337
+ case import_dist$1.AST_NODE_TYPES.TSParameterProperty: return patternBindsName(pattern.parameter, name);
30338
+ default: return false;
30339
+ }
30367
30340
  }
30368
30341
  var no_leaked_fetch_default = createRule({
30369
30342
  meta: {
@@ -30375,7 +30348,7 @@ var no_leaked_fetch_default = createRule({
30375
30348
  },
30376
30349
  schema: []
30377
30350
  },
30378
- name: RULE_NAME$4,
30351
+ name: "no-leaked-fetch",
30379
30352
  create: create$4
30380
30353
  });
30381
30354
  function create$4(context) {
@@ -30384,7 +30357,7 @@ function create$4(context) {
30384
30357
  const fetchEntries = [];
30385
30358
  const abortEntries = [];
30386
30359
  return {
30387
- ["CallExpression"](node) {
30360
+ CallExpression(node) {
30388
30361
  M(getCallKind$4(node)).with("fetch", () => {
30389
30362
  const fn = traverse_exports.findParent(node, check_exports.isFunction);
30390
30363
  if (fn == null || !isUseEffectSetupCallback(fn)) return;
@@ -30405,7 +30378,7 @@ function create$4(context) {
30405
30378
  });
30406
30379
  }).otherwise(() => null);
30407
30380
  },
30408
- ["Program:exit"]() {
30381
+ "Program:exit"() {
30409
30382
  for (const fEntry of fetchEntries) {
30410
30383
  const controller = fEntry.controller;
30411
30384
  if (controller == null) {
@@ -30424,6 +30397,87 @@ function create$4(context) {
30424
30397
  }
30425
30398
  };
30426
30399
  }
30400
+ const isUseEffectCallback$4 = or(isUseEffectSetupCallback, isUseEffectCleanupCallback);
30401
+ function getCallKind$4(node) {
30402
+ const callee = extract_exports.unwrap(node.callee);
30403
+ switch (true) {
30404
+ case check_exports.isIdentifier(callee, "fetch") && !isNameBoundInEnclosingScopes("fetch", node): return "fetch";
30405
+ case callee.type === import_dist$1.AST_NODE_TYPES.MemberExpression && !callee.computed && check_exports.isIdentifier(callee.property, "fetch") && isGlobalObject(extract_exports.unwrap(callee.object)): return "fetch";
30406
+ case extract_exports.getCalleeName(node) === "abort": return "abort";
30407
+ default: return "other";
30408
+ }
30409
+ }
30410
+ function getFetchController(context, node) {
30411
+ const [, optionsArg] = node.arguments;
30412
+ if (optionsArg == null) return {
30413
+ controller: null,
30414
+ isParamSignal: false
30415
+ };
30416
+ const options = resolveToObjectExpression(context, optionsArg);
30417
+ if (options == null) return {
30418
+ controller: null,
30419
+ isParamSignal: false
30420
+ };
30421
+ const signalProp = findSignalProperty(options.properties);
30422
+ if (signalProp?.type !== import_dist$1.AST_NODE_TYPES.Property) return {
30423
+ controller: null,
30424
+ isParamSignal: false
30425
+ };
30426
+ return getControllerFromSignal(context, signalProp.value);
30427
+ }
30428
+ function getControllerFromSignal(context, node, seen = /* @__PURE__ */ new Set()) {
30429
+ node = extract_exports.unwrap(node);
30430
+ switch (node.type) {
30431
+ case import_dist$1.AST_NODE_TYPES.MemberExpression: return {
30432
+ controller: node.object,
30433
+ isParamSignal: false
30434
+ };
30435
+ case import_dist$1.AST_NODE_TYPES.Identifier: {
30436
+ if (seen.has(node)) return {
30437
+ controller: null,
30438
+ isParamSignal: false
30439
+ };
30440
+ seen.add(node);
30441
+ const resolved = resolveOrigin(context, node);
30442
+ const resolvedUnwrapped = resolved == null ? null : extract_exports.unwrap(resolved);
30443
+ if (resolvedUnwrapped?.type === import_dist$1.AST_NODE_TYPES.MemberExpression) return {
30444
+ controller: resolvedUnwrapped.object,
30445
+ isParamSignal: false
30446
+ };
30447
+ if (resolved != null && check_exports.isFunction(resolved)) return {
30448
+ controller: node,
30449
+ isParamSignal: true
30450
+ };
30451
+ if (resolvedUnwrapped != null) return getControllerFromSignal(context, resolvedUnwrapped, seen);
30452
+ return {
30453
+ controller: null,
30454
+ isParamSignal: false
30455
+ };
30456
+ }
30457
+ default: return {
30458
+ controller: null,
30459
+ isParamSignal: false
30460
+ };
30461
+ }
30462
+ }
30463
+ function findSignalProperty(properties) {
30464
+ for (const property of properties) {
30465
+ if (property.type === import_dist$1.AST_NODE_TYPES.Property) {
30466
+ const key = extract_exports.unwrap(property.key);
30467
+ if ((!property.computed && check_exports.isIdentifier(key) ? key.name : key.type === import_dist$1.AST_NODE_TYPES.Literal && typeof key.value === "string" ? key.value : key.type === import_dist$1.AST_NODE_TYPES.TemplateLiteral && key.expressions.length === 0 ? key.quasis[0]?.value.cooked ?? key.quasis[0]?.value.raw ?? null : null) === "signal") return property;
30468
+ }
30469
+ if (property.type === import_dist$1.AST_NODE_TYPES.SpreadElement && property.argument.type === import_dist$1.AST_NODE_TYPES.ObjectExpression) {
30470
+ const found = findSignalProperty(property.argument.properties);
30471
+ if (found != null) return found;
30472
+ }
30473
+ }
30474
+ return null;
30475
+ }
30476
+ function getAbortController(node) {
30477
+ const callee = extract_exports.unwrap(node.callee);
30478
+ if (callee.type === import_dist$1.AST_NODE_TYPES.MemberExpression) return callee.object;
30479
+ return null;
30480
+ }
30427
30481
  function isNewObserver$1(node, name) {
30428
30482
  if (node?.type !== import_dist$1.AST_NODE_TYPES.NewExpression) return false;
30429
30483
  const callee = extract_exports.unwrap(node.callee);
@@ -30972,7 +31026,7 @@ const finalPlugin$1 = {
30972
31026
  ...plugin$2,
30973
31027
  configs: { ["recommended"]: createConfig$1(recommended_exports$1) }
30974
31028
  };
30975
- // ../../node_modules/.pnpm/@eslint-react+eslint-plugin@5.30.1_eslint@10.14.0_jiti@2.7.0_supports-color@10.2.2__sup_3976cd73d7499c76417f43579c9f9411/node_modules/@eslint-react/eslint-plugin/dist/index.js
31029
+ // ../../node_modules/.pnpm/@eslint-react+eslint-plugin@5.30.2_eslint@10.14.0_jiti@2.7.0_supports-color@10.2.2__sup_98d550870ac7eb12219d2aa67c04bf1a/node_modules/@eslint-react/eslint-plugin/dist/index.js
30976
31030
  var __defProp = Object.defineProperty;
30977
31031
  var __exportAll = (all, flags) => {
30978
31032
  let target = Object.setPrototypeOf({}, null);
@@ -31372,7 +31426,7 @@ const rules = {
31372
31426
  const settings = { ...settings$1 };
31373
31427
  const languageOptions = languageOptions$1;
31374
31428
  var name = "@eslint-react/eslint-plugin";
31375
- var version = "5.30.1";
31429
+ var version = "5.30.2";
31376
31430
  function typeOf(t) {
31377
31431
  return Object.prototype.toString.call(t).replace(/^\[object (.+)\]$/, "$1").toLowerCase();
31378
31432
  }
@@ -32441,7 +32495,7 @@ const finalPlugin = {
32441
32495
  ["x"]: createConfig(x_exports)
32442
32496
  }
32443
32497
  };
32444
- // src/react.ts
32498
+ // src/app/react.ts
32445
32499
  const PREFIX = "@eslint-react/";
32446
32500
  const upstreamConfigs = finalPlugin.configs;
32447
32501
  const configs = pipe(upstreamConfigs, Record.map((config) => ({ rules: Option.getOrUndefined(rulesOf(config)) })));