@sarj/eslint-plugin 16.3.0 → 16.3.1

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/index.cjs CHANGED
@@ -2506,7 +2506,7 @@ var no_unlocalized_toast_default = createRule({
2506
2506
  return {
2507
2507
  CallExpression(node) {
2508
2508
  const callee = node.callee;
2509
- const receiver = callee.type === import_utils16.AST_NODE_TYPES.Identifier ? callee : callee.type === import_utils16.AST_NODE_TYPES.MemberExpression && !callee.computed && callee.object.type === import_utils16.AST_NODE_TYPES.Identifier && callee.property.type === import_utils16.AST_NODE_TYPES.Identifier && methods.includes(callee.property.name) ? callee.object : null;
2509
+ const receiver = callee.type === import_utils16.AST_NODE_TYPES.Identifier ? callee : callee.type === import_utils16.AST_NODE_TYPES.MemberExpression && callee.object.type === import_utils16.AST_NODE_TYPES.Identifier && import_utils16.ASTUtils.getPropertyName(callee) !== null && methods.includes(import_utils16.ASTUtils.getPropertyName(callee) ?? "") ? callee.object : null;
2510
2510
  if (receiver === null) return;
2511
2511
  const imported = importedComponent(receiver, context.sourceCode);
2512
2512
  if (!functions.some(
@@ -4753,12 +4753,12 @@ function importedName(node) {
4753
4753
  return node.imported.type === import_utils27.AST_NODE_TYPES.Identifier ? node.imported.name : String(node.imported.value);
4754
4754
  }
4755
4755
  function registration(sourceCode, node) {
4756
- if (node.callee.type !== import_utils27.AST_NODE_TYPES.MemberExpression || node.callee.computed || node.callee.object.type !== import_utils27.AST_NODE_TYPES.Identifier || !isUnshadowedGlobal(sourceCode, node.callee.object) || node.callee.property.type !== import_utils27.AST_NODE_TYPES.Identifier || node.callee.property.name !== "addEventListener" && node.callee.property.name !== "removeEventListener" || node.arguments.length < 2) return null;
4756
+ if (node.callee.type !== import_utils27.AST_NODE_TYPES.MemberExpression || node.callee.object.type !== import_utils27.AST_NODE_TYPES.Identifier || !isUnshadowedGlobal(sourceCode, node.callee.object) || import_utils27.ASTUtils.getPropertyName(node.callee) === null || (import_utils27.ASTUtils.getPropertyName(node.callee) ?? "") !== "addEventListener" && (import_utils27.ASTUtils.getPropertyName(node.callee) ?? "") !== "removeEventListener" || node.arguments.length < 2) return null;
4757
4757
  const event = node.arguments[0];
4758
4758
  const callback = node.arguments[1];
4759
4759
  if (event === void 0 || callback === void 0) return null;
4760
4760
  if (event.type !== import_utils27.AST_NODE_TYPES.Literal || typeof event.value !== "string" || callback.type !== import_utils27.AST_NODE_TYPES.Identifier) return null;
4761
- const operation = node.callee.property.name === "addEventListener" ? "add" : "remove";
4761
+ const operation = (import_utils27.ASTUtils.getPropertyName(node.callee) ?? "") === "addEventListener" ? "add" : "remove";
4762
4762
  if (node.callee.object.name === "window" && event.value === "focus") return { operation, event: "focus", callback };
4763
4763
  if (node.callee.object.name === "document" && event.value === "visibilitychange") return { operation, event: "visibilitychange", callback };
4764
4764
  return null;
@@ -4838,7 +4838,7 @@ var no_duplicate_lifecycle_refresh_listeners_default = createRule({
4838
4838
  registrations.set(container, callbacks);
4839
4839
  }
4840
4840
  }
4841
- if (node.callee.type !== import_utils27.AST_NODE_TYPES.MemberExpression || node.callee.computed || node.callee.object.type !== import_utils27.AST_NODE_TYPES.Identifier || node.callee.property.type !== import_utils27.AST_NODE_TYPES.Identifier || node.callee.property.name !== "refresh") return;
4841
+ if (node.callee.type !== import_utils27.AST_NODE_TYPES.MemberExpression || node.callee.object.type !== import_utils27.AST_NODE_TYPES.Identifier || import_utils27.ASTUtils.getPropertyName(node.callee) === null || (import_utils27.ASTUtils.getPropertyName(node.callee) ?? "") !== "refresh") return;
4842
4842
  const router = import_utils27.ASTUtils.findVariable(context.sourceCode.getScope(node.callee.object), node.callee.object.name);
4843
4843
  if (router === null || !routers.has(router)) return;
4844
4844
  const fn = enclosingFunction(context.sourceCode, node);
@@ -5214,8 +5214,8 @@ function isStaticFragment(expression) {
5214
5214
  if (expression.type === import_utils30.AST_NODE_TYPES.Identifier) {
5215
5215
  return CONSTANT_CASE_RE.test(expression.name);
5216
5216
  }
5217
- if (expression.type === import_utils30.AST_NODE_TYPES.MemberExpression && !expression.computed && expression.property.type === import_utils30.AST_NODE_TYPES.Identifier) {
5218
- return CONSTANT_CASE_RE.test(expression.property.name);
5217
+ if (expression.type === import_utils30.AST_NODE_TYPES.MemberExpression && import_utils30.ASTUtils.getPropertyName(expression) !== null) {
5218
+ return CONSTANT_CASE_RE.test(import_utils30.ASTUtils.getPropertyName(expression) ?? "");
5219
5219
  }
5220
5220
  if (expression.type === import_utils30.AST_NODE_TYPES.Literal) {
5221
5221
  return typeof expression.value === "string";
@@ -5314,10 +5314,10 @@ function staticStatementText(node) {
5314
5314
  }
5315
5315
  function statementMethodName(node, methods) {
5316
5316
  const callee = node.callee;
5317
- if (callee.type !== import_utils30.AST_NODE_TYPES.MemberExpression || callee.computed || callee.property.type !== import_utils30.AST_NODE_TYPES.Identifier) {
5317
+ if (callee.type !== import_utils30.AST_NODE_TYPES.MemberExpression || import_utils30.ASTUtils.getPropertyName(callee) === null) {
5318
5318
  return null;
5319
5319
  }
5320
- const name = callee.property.name;
5320
+ const name = import_utils30.ASTUtils.getPropertyName(callee) ?? "";
5321
5321
  return methods.has(name) ? name : null;
5322
5322
  }
5323
5323
  var no_dynamic_sql_default = createRule({
@@ -6420,11 +6420,11 @@ function isMathRandomCall(node) {
6420
6420
  return false;
6421
6421
  }
6422
6422
  const callee = node.callee;
6423
- if (callee.type !== "MemberExpression" || callee.computed) {
6423
+ if (callee.type !== "MemberExpression") {
6424
6424
  return false;
6425
6425
  }
6426
- const { object, property } = callee;
6427
- return object.type === "Identifier" && object.name === "Math" && property.type === "Identifier" && property.name === "random";
6426
+ const { object } = callee;
6427
+ return object.type === "Identifier" && object.name === "Math" && import_utils36.ASTUtils.getPropertyName(callee) === "random";
6428
6428
  }
6429
6429
  function findEnclosingNames(node) {
6430
6430
  const names = [];
@@ -6489,7 +6489,7 @@ function climbValueChain(node) {
6489
6489
  let current = node;
6490
6490
  let parent = current.parent;
6491
6491
  while (parent) {
6492
- if (parent.type === "MemberExpression" && parent.object === current && !parent.computed) {
6492
+ if (parent.type === "MemberExpression" && parent.object === current && import_utils36.ASTUtils.getPropertyName(parent) !== null) {
6493
6493
  current = parent;
6494
6494
  parent = current.parent;
6495
6495
  continue;
@@ -6565,8 +6565,8 @@ function appendPropertyName(property, names) {
6565
6565
  }
6566
6566
  function appendAssignedName(assignment, directBinding, names) {
6567
6567
  if (directBinding && assignment.left.type === "Identifier") names.push(assignment.left.name);
6568
- if (directBinding && assignment.left.type === "MemberExpression" && !assignment.left.computed && assignment.left.property.type === "Identifier") {
6569
- names.push(assignment.left.property.name);
6568
+ if (directBinding && assignment.left.type === "MemberExpression" && import_utils36.ASTUtils.getPropertyName(assignment.left) !== null) {
6569
+ names.push(import_utils36.ASTUtils.getPropertyName(assignment.left) ?? "");
6570
6570
  }
6571
6571
  }
6572
6572
  function appendDirectBindingName(id, directBinding, names) {
@@ -6857,7 +6857,7 @@ function nodeWithin(node, container) {
6857
6857
  return container !== null && node.range[0] >= container.range[0] && node.range[1] <= container.range[1];
6858
6858
  }
6859
6859
  function isJsonStringify(callee) {
6860
- return callee.type === "MemberExpression" && !callee.computed && callee.object.type === "Identifier" && callee.object.name === "JSON" && callee.property.type === "Identifier" && callee.property.name === "stringify";
6860
+ return callee.type === "MemberExpression" && callee.object.type === "Identifier" && callee.object.name === "JSON" && import_utils38.ASTUtils.getPropertyName(callee) !== null && (import_utils38.ASTUtils.getPropertyName(callee) ?? "") === "stringify";
6861
6861
  }
6862
6862
  function directLiteralValues(argument) {
6863
6863
  if (argument.type === "ObjectExpression") {
@@ -6887,7 +6887,7 @@ function expressionSuggestsError(expression, scope) {
6887
6887
  return expression.type === "MemberExpression" && memberSuggestsError(expression, scope);
6888
6888
  }
6889
6889
  function memberSuggestsError(member, scope) {
6890
- const propName2 = !member.computed && member.property.type === "Identifier" ? member.property.name : null;
6890
+ const propName2 = import_utils38.ASTUtils.getPropertyName(member) !== null ? import_utils38.ASTUtils.getPropertyName(member) ?? "" : null;
6891
6891
  const base = member.object;
6892
6892
  const baseSuggestsError = base.type === "Identifier" && identifierIsProvenError(base, scope);
6893
6893
  if (baseSuggestsError) {
@@ -7811,8 +7811,8 @@ function calleeName2(callee) {
7811
7811
  if (callee.type === "Identifier") {
7812
7812
  return callee.name;
7813
7813
  }
7814
- if (callee.type === "MemberExpression" && !callee.computed && callee.property.type === "Identifier") {
7815
- return callee.property.name;
7814
+ if (callee.type === "MemberExpression" && import_utils45.ASTUtils.getPropertyName(callee) !== null) {
7815
+ return import_utils45.ASTUtils.getPropertyName(callee) ?? "";
7816
7816
  }
7817
7817
  return null;
7818
7818
  }
@@ -7827,9 +7827,10 @@ function createLogMatcher(options = {}) {
7827
7827
  case "Identifier":
7828
7828
  return loggerNames.has(expr.name.toLowerCase());
7829
7829
  case "MemberExpression": {
7830
- const { property, object } = expr;
7831
- if (!expr.computed && property.type === "Identifier") {
7832
- const lowered = property.name.toLowerCase();
7830
+ const { object } = expr;
7831
+ const property = import_utils45.ASTUtils.getPropertyName(expr);
7832
+ if (property !== null) {
7833
+ const lowered = property.toLowerCase();
7833
7834
  if (loggerNames.has(lowered) || LOGGER_FACTORIES.has(lowered)) {
7834
7835
  return true;
7835
7836
  }
@@ -7838,7 +7839,7 @@ function createLogMatcher(options = {}) {
7838
7839
  }
7839
7840
  case "CallExpression": {
7840
7841
  const callee = expr.callee;
7841
- if (callee.type === "MemberExpression" && !callee.computed && callee.property.type === "Identifier" && LOGGER_FACTORIES.has(callee.property.name.toLowerCase())) {
7842
+ if (callee.type === "MemberExpression" && import_utils45.ASTUtils.getPropertyName(callee) !== null && LOGGER_FACTORIES.has((import_utils45.ASTUtils.getPropertyName(callee) ?? "").toLowerCase())) {
7842
7843
  return true;
7843
7844
  }
7844
7845
  if (callee.type !== "Super") {
@@ -7865,10 +7866,10 @@ function createLogMatcher(options = {}) {
7865
7866
  return true;
7866
7867
  }
7867
7868
  const callee = expr.callee;
7868
- if (callee.type !== "MemberExpression" || callee.computed || callee.property.type !== "Identifier") {
7869
+ if (callee.type !== "MemberExpression" || import_utils45.ASTUtils.getPropertyName(callee) === null) {
7869
7870
  return false;
7870
7871
  }
7871
- if (!LOG_METHODS.has(callee.property.name.toLowerCase())) {
7872
+ if (!LOG_METHODS.has((import_utils45.ASTUtils.getPropertyName(callee) ?? "").toLowerCase())) {
7872
7873
  return false;
7873
7874
  }
7874
7875
  return isLoggerReceiver(callee.object);
@@ -8269,10 +8270,10 @@ function memberName5(node) {
8269
8270
  while (current.type === import_utils48.AST_NODE_TYPES.TSAsExpression || current.type === import_utils48.AST_NODE_TYPES.TSNonNullExpression || current.type === import_utils48.AST_NODE_TYPES.TSTypeAssertion) {
8270
8271
  current = current.expression;
8271
8272
  }
8272
- if (current.type !== import_utils48.AST_NODE_TYPES.MemberExpression || current.computed || current.property.type !== import_utils48.AST_NODE_TYPES.Identifier) {
8273
+ if (current.type !== import_utils48.AST_NODE_TYPES.MemberExpression || import_utils48.ASTUtils.getPropertyName(current) === null) {
8273
8274
  return null;
8274
8275
  }
8275
- return current.property.name;
8276
+ return import_utils48.ASTUtils.getPropertyName(current) ?? "";
8276
8277
  }
8277
8278
  function isDirectCaseTranslation(left, right) {
8278
8279
  if (SNAKE_CASE_RE2.test(left) && LOWER_CAMEL_CASE_RE.test(right)) {
@@ -9229,11 +9230,16 @@ var NO_RAW_ENV_DOCUMENTATION = {
9229
9230
  };
9230
9231
  var CONFIG_FILE_RE = /(^|[\\/])[\w.-]+\.config\.[cm]?[jt]sx?$/;
9231
9232
  var ENV_BOUNDARY_FILE_RE = /(^|[\\/])(?:env|client-env|server-env|client-settings|server-settings)\.[cm]?[jt]sx?$/;
9232
- function isProcessEnv(node) {
9233
- return !node.computed && node.object.type === "Identifier" && node.object.name === "process" && node.property.type === "Identifier" && node.property.name === "env";
9233
+ function isProcessEnv(node, context) {
9234
+ if (node.object.type !== "Identifier" || import_utils53.ASTUtils.getPropertyName(node) !== "env") return false;
9235
+ const binding = import_utils53.ASTUtils.findVariable(context.sourceCode.getScope(node.object), node.object.name);
9236
+ if (binding === null || binding.defs.length === 0) return node.object.name === "process";
9237
+ return binding.defs.every(
9238
+ (definition) => definition.type === "ImportBinding" && definition.parent.type === "ImportDeclaration" && definition.parent.importKind !== "type" && ["node:process", "process"].includes(definition.parent.source.value) && ["ImportDefaultSpecifier", "ImportNamespaceSpecifier"].includes(definition.node.type)
9239
+ );
9234
9240
  }
9235
9241
  function isImportMetaEnv(node) {
9236
- return !node.computed && node.property.type === "Identifier" && node.property.name === "env" && node.object.type === "MetaProperty" && node.object.meta.name === "import" && node.object.property.name === "meta";
9242
+ return import_utils53.ASTUtils.getPropertyName(node) !== null && (import_utils53.ASTUtils.getPropertyName(node) ?? "") === "env" && node.object.type === "MetaProperty" && node.object.meta.name === "import" && node.object.property.name === "meta";
9237
9243
  }
9238
9244
  var BUILD_TIME_CONSTANTS = /* @__PURE__ */ new Set([
9239
9245
  "NODE_ENV",
@@ -9250,7 +9256,7 @@ var PLATFORM_MARKERS = /* @__PURE__ */ new Set([
9250
9256
  ]);
9251
9257
  function isExemptVariableAccess(node) {
9252
9258
  const parent = node.parent;
9253
- return parent.type === "MemberExpression" && parent.object === node && !parent.computed && parent.property.type === "Identifier" && (BUILD_TIME_CONSTANTS.has(parent.property.name) || PLATFORM_MARKERS.has(parent.property.name));
9259
+ return parent.type === "MemberExpression" && parent.object === node && import_utils53.ASTUtils.getPropertyName(parent) !== null && (BUILD_TIME_CONSTANTS.has(import_utils53.ASTUtils.getPropertyName(parent) ?? "") || PLATFORM_MARKERS.has(import_utils53.ASTUtils.getPropertyName(parent) ?? ""));
9254
9260
  }
9255
9261
  function isWriteTarget(node) {
9256
9262
  const access = node.parent.type === "MemberExpression" && node.parent.object === node ? node.parent : node;
@@ -9293,14 +9299,10 @@ var no_raw_env_default = createRule({
9293
9299
  CallExpression(node) {
9294
9300
  if (!boundaryFile) return;
9295
9301
  const callee = node.callee;
9296
- if (callee.type === "Identifier" && callee.name === "createEnv" || callee.type === "MemberExpression" && !callee.computed && callee.property.type === "Identifier" && (["parse", "safeParse"].includes(callee.property.name) || callee.property.name === "object" && callee.object.type === "Identifier" && callee.object.name === "z")) hasValidationCall = true;
9302
+ if (callee.type === "Identifier" && callee.name === "createEnv" || callee.type === "MemberExpression" && import_utils53.ASTUtils.getPropertyName(callee) !== null && (["parse", "safeParse"].includes(import_utils53.ASTUtils.getPropertyName(callee) ?? "") || (import_utils53.ASTUtils.getPropertyName(callee) ?? "") === "object" && callee.object.type === "Identifier" && callee.object.name === "z")) hasValidationCall = true;
9297
9303
  },
9298
9304
  MemberExpression(node) {
9299
- if (isProcessEnv(node) && node.object.type === "Identifier") {
9300
- const binding = import_utils53.ASTUtils.findVariable(context.sourceCode.getScope(node), node.object.name);
9301
- if (binding !== null && binding.defs.length > 0 && !binding.defs.every((definition) => definition.type === "ImportBinding" && definition.parent.type === "ImportDeclaration" && ["node:process", "process"].includes(definition.parent.source.value) && ["ImportDefaultSpecifier", "ImportNamespaceSpecifier"].includes(definition.node.type))) return;
9302
- }
9303
- if ((isProcessEnv(node) || isImportMetaEnv(node)) && !isExemptVariableAccess(node) && !isWriteTarget(node) && !isWholeEnvSpread(node)) {
9305
+ if ((isProcessEnv(node, context) || isImportMetaEnv(node)) && !isExemptVariableAccess(node) && !isWriteTarget(node) && !isWholeEnvSpread(node)) {
9304
9306
  reads.push(node);
9305
9307
  }
9306
9308
  },
@@ -9734,7 +9736,7 @@ function enclosingIntervalCallback(sourceCode, node) {
9734
9736
  return null;
9735
9737
  }
9736
9738
  function isIntervalCallee(sourceCode, node) {
9737
- return node.type === import_utils56.AST_NODE_TYPES.Identifier && node.name === "setInterval" && isUnshadowedGlobal2(sourceCode, node) || node.type === import_utils56.AST_NODE_TYPES.MemberExpression && !node.computed && node.object.type === import_utils56.AST_NODE_TYPES.Identifier && (node.object.name === "window" || node.object.name === "globalThis") && isUnshadowedGlobal2(sourceCode, node.object) && node.property.type === import_utils56.AST_NODE_TYPES.Identifier && node.property.name === "setInterval";
9739
+ return node.type === import_utils56.AST_NODE_TYPES.Identifier && node.name === "setInterval" && isUnshadowedGlobal2(sourceCode, node) || node.type === import_utils56.AST_NODE_TYPES.MemberExpression && node.object.type === import_utils56.AST_NODE_TYPES.Identifier && (node.object.name === "window" || node.object.name === "globalThis") && isUnshadowedGlobal2(sourceCode, node.object) && import_utils56.ASTUtils.getPropertyName(node) !== null && (import_utils56.ASTUtils.getPropertyName(node) ?? "") === "setInterval";
9738
9740
  }
9739
9741
  function isUnshadowedGlobal2(sourceCode, node) {
9740
9742
  const variable = import_utils56.ASTUtils.findVariable(sourceCode.getScope(node), node.name);
@@ -9773,7 +9775,7 @@ var no_router_refresh_polling_default = createRule({
9773
9775
  }
9774
9776
  },
9775
9777
  CallExpression(node) {
9776
- if (node.callee.type !== import_utils56.AST_NODE_TYPES.MemberExpression || node.callee.computed || node.callee.object.type !== import_utils56.AST_NODE_TYPES.Identifier || node.callee.property.type !== import_utils56.AST_NODE_TYPES.Identifier || node.callee.property.name !== "refresh") return;
9778
+ if (node.callee.type !== import_utils56.AST_NODE_TYPES.MemberExpression || node.callee.object.type !== import_utils56.AST_NODE_TYPES.Identifier || import_utils56.ASTUtils.getPropertyName(node.callee) === null || (import_utils56.ASTUtils.getPropertyName(node.callee) ?? "") !== "refresh") return;
9777
9779
  const router = import_utils56.ASTUtils.findVariable(
9778
9780
  context.sourceCode.getScope(node.callee.object),
9779
9781
  node.callee.object.name
@@ -10560,7 +10562,7 @@ function hasRedactionMarker(name) {
10560
10562
  }
10561
10563
  function valueName(node) {
10562
10564
  if (node.type === "Identifier") return node.name;
10563
- return node.type === "MemberExpression" && !node.computed && node.property.type === "Identifier" ? node.property.name : null;
10565
+ return node.type === "MemberExpression" && import_utils61.ASTUtils.getPropertyName(node) !== null ? import_utils61.ASTUtils.getPropertyName(node) ?? "" : null;
10564
10566
  }
10565
10567
  function isRawSecretValue(prop) {
10566
10568
  if (prop.shorthand) {
@@ -10609,11 +10611,11 @@ function rawBlobValueName(value) {
10609
10611
  if (value.type === "Identifier") {
10610
10612
  return isRawBlobName(value.name) ? value.name : null;
10611
10613
  }
10612
- if (value.type === "MemberExpression" && !value.computed && value.property.type === "Identifier") {
10613
- return isRawBlobName(value.property.name) ? value.property.name : null;
10614
+ if (value.type === "MemberExpression" && import_utils61.ASTUtils.getPropertyName(value) !== null) {
10615
+ return isRawBlobName(import_utils61.ASTUtils.getPropertyName(value) ?? "") ? import_utils61.ASTUtils.getPropertyName(value) ?? "" : null;
10614
10616
  }
10615
- if (value.type === "CallExpression" && value.arguments.length === 0 && value.callee.type === "MemberExpression" && !value.callee.computed && value.callee.object.type === "Identifier" && /^(?:res|response|\w+Response)$/.test(value.callee.object.name) && value.callee.property.type === "Identifier" && (value.callee.property.name === "json" || value.callee.property.name === "text")) {
10616
- return `${value.callee.object.name}.${value.callee.property.name}()`;
10617
+ if (value.type === "CallExpression" && value.arguments.length === 0 && value.callee.type === "MemberExpression" && value.callee.object.type === "Identifier" && /^(?:res|response|\w+Response)$/.test(value.callee.object.name) && import_utils61.ASTUtils.getPropertyName(value.callee) !== null && ((import_utils61.ASTUtils.getPropertyName(value.callee) ?? "") === "json" || (import_utils61.ASTUtils.getPropertyName(value.callee) ?? "") === "text")) {
10618
+ return `${value.callee.object.name}.${import_utils61.ASTUtils.getPropertyName(value.callee) ?? ""}()`;
10617
10619
  }
10618
10620
  return null;
10619
10621
  }
@@ -11071,8 +11073,8 @@ function argsIncludeBinding(args, caughtName) {
11071
11073
  return args.some((arg) => subtreeReadsName(arg, caughtName));
11072
11074
  }
11073
11075
  function isParseShapedNode(node) {
11074
- if (node.type === import_utils64.AST_NODE_TYPES.CallExpression && node.callee.type === import_utils64.AST_NODE_TYPES.MemberExpression && !node.callee.computed && node.callee.property.type === import_utils64.AST_NODE_TYPES.Identifier) {
11075
- return node.callee.property.name === "parse";
11076
+ if (node.type === import_utils64.AST_NODE_TYPES.CallExpression && node.callee.type === import_utils64.AST_NODE_TYPES.MemberExpression && import_utils64.ASTUtils.getPropertyName(node.callee) !== null) {
11077
+ return (import_utils64.ASTUtils.getPropertyName(node.callee) ?? "") === "parse";
11076
11078
  }
11077
11079
  if (node.type === import_utils64.AST_NODE_TYPES.NewExpression && node.callee.type === import_utils64.AST_NODE_TYPES.Identifier) {
11078
11080
  return SAFE_PARSE_CONSTRUCTORS.has(node.callee.name);
@@ -11085,21 +11087,21 @@ var SAFE_PARSE_CONSTRUCTORS = /* @__PURE__ */ new Set([
11085
11087
  "URLPattern"
11086
11088
  ]);
11087
11089
  function isBodyDecodeNode(node) {
11088
- return node.type === import_utils64.AST_NODE_TYPES.CallExpression && node.callee.type === import_utils64.AST_NODE_TYPES.MemberExpression && !node.callee.computed && node.callee.property.type === import_utils64.AST_NODE_TYPES.Identifier && BODY_DECODE_METHODS.has(node.callee.property.name);
11090
+ return node.type === import_utils64.AST_NODE_TYPES.CallExpression && node.callee.type === import_utils64.AST_NODE_TYPES.MemberExpression && import_utils64.ASTUtils.getPropertyName(node.callee) !== null && BODY_DECODE_METHODS.has(import_utils64.ASTUtils.getPropertyName(node.callee) ?? "");
11089
11091
  }
11090
11092
  function isSafeParseSupportCall(node) {
11091
11093
  const callee = node.callee;
11092
- if (callee.type !== import_utils64.AST_NODE_TYPES.MemberExpression || callee.computed || callee.property.type !== import_utils64.AST_NODE_TYPES.Identifier) {
11094
+ if (callee.type !== import_utils64.AST_NODE_TYPES.MemberExpression || import_utils64.ASTUtils.getPropertyName(callee) === null) {
11093
11095
  return false;
11094
11096
  }
11095
- if (callee.property.name === "isArray" && callee.object.type === import_utils64.AST_NODE_TYPES.Identifier && callee.object.name === "Array") {
11097
+ if ((import_utils64.ASTUtils.getPropertyName(callee) ?? "") === "isArray" && callee.object.type === import_utils64.AST_NODE_TYPES.Identifier && callee.object.name === "Array") {
11096
11098
  return true;
11097
11099
  }
11098
- if (callee.property.name !== "getItem") return false;
11100
+ if ((import_utils64.ASTUtils.getPropertyName(callee) ?? "") !== "getItem") return false;
11099
11101
  if (callee.object.type === import_utils64.AST_NODE_TYPES.Identifier && (callee.object.name === "localStorage" || callee.object.name === "sessionStorage")) {
11100
11102
  return true;
11101
11103
  }
11102
- return callee.object.type === import_utils64.AST_NODE_TYPES.MemberExpression && !callee.object.computed && callee.object.object.type === import_utils64.AST_NODE_TYPES.Identifier && (callee.object.object.name === "window" || callee.object.object.name === "globalThis") && callee.object.property.type === import_utils64.AST_NODE_TYPES.Identifier && (callee.object.property.name === "localStorage" || callee.object.property.name === "sessionStorage");
11104
+ return callee.object.type === import_utils64.AST_NODE_TYPES.MemberExpression && callee.object.object.type === import_utils64.AST_NODE_TYPES.Identifier && (callee.object.object.name === "window" || callee.object.object.name === "globalThis") && import_utils64.ASTUtils.getPropertyName(callee.object) !== null && ((import_utils64.ASTUtils.getPropertyName(callee.object) ?? "") === "localStorage" || (import_utils64.ASTUtils.getPropertyName(callee.object) ?? "") === "sessionStorage");
11103
11105
  }
11104
11106
  var BODY_DECODE_METHODS = /* @__PURE__ */ new Set([
11105
11107
  "json",
@@ -11412,7 +11414,7 @@ var ZOD_CHAIN_METHODS = /* @__PURE__ */ new Set([
11412
11414
  "transform"
11413
11415
  ]);
11414
11416
  function isBodyParseCall(node) {
11415
- return node.type === import_utils65.AST_NODE_TYPES.CallExpression && node.arguments.length === 0 && node.callee.type === import_utils65.AST_NODE_TYPES.MemberExpression && !node.callee.computed && node.callee.property.type === import_utils65.AST_NODE_TYPES.Identifier && BODY_PARSE_METHODS.has(node.callee.property.name);
11417
+ return node.type === import_utils65.AST_NODE_TYPES.CallExpression && node.arguments.length === 0 && node.callee.type === import_utils65.AST_NODE_TYPES.MemberExpression && import_utils65.ASTUtils.getPropertyName(node.callee) !== null && BODY_PARSE_METHODS.has(import_utils65.ASTUtils.getPropertyName(node.callee) ?? "");
11416
11418
  }
11417
11419
  var TEARDOWN_METHODS = /* @__PURE__ */ new Set([
11418
11420
  "cancel",
@@ -11427,10 +11429,10 @@ var TEARDOWN_METHODS = /* @__PURE__ */ new Set([
11427
11429
  var DIRECTIVE_COMMENT_RE = /^\s*(eslint-|@ts-|prettier-ignore|biome-ignore|c8 |v8 |istanbul )/;
11428
11430
  var isExplanatory = (comment) => !DIRECTIVE_COMMENT_RE.test(comment.value);
11429
11431
  function isTeardownCall(node) {
11430
- return node.type === import_utils65.AST_NODE_TYPES.CallExpression && node.callee.type === import_utils65.AST_NODE_TYPES.MemberExpression && !node.callee.computed && node.callee.property.type === import_utils65.AST_NODE_TYPES.Identifier && TEARDOWN_METHODS.has(node.callee.property.name);
11432
+ return node.type === import_utils65.AST_NODE_TYPES.CallExpression && node.callee.type === import_utils65.AST_NODE_TYPES.MemberExpression && import_utils65.ASTUtils.getPropertyName(node.callee) !== null && TEARDOWN_METHODS.has(import_utils65.ASTUtils.getPropertyName(node.callee) ?? "");
11431
11433
  }
11432
11434
  function isCancelledWebShare(node) {
11433
- return node.type === import_utils65.AST_NODE_TYPES.CallExpression && node.callee.type === import_utils65.AST_NODE_TYPES.MemberExpression && !node.callee.computed && node.callee.object.type === import_utils65.AST_NODE_TYPES.Identifier && node.callee.object.name === "navigator" && node.callee.property.type === import_utils65.AST_NODE_TYPES.Identifier && node.callee.property.name === "share";
11435
+ return node.type === import_utils65.AST_NODE_TYPES.CallExpression && node.callee.type === import_utils65.AST_NODE_TYPES.MemberExpression && node.callee.object.type === import_utils65.AST_NODE_TYPES.Identifier && node.callee.object.name === "navigator" && import_utils65.ASTUtils.getPropertyName(node.callee) !== null && (import_utils65.ASTUtils.getPropertyName(node.callee) ?? "") === "share";
11434
11436
  }
11435
11437
  function isSilentHandler(handler) {
11436
11438
  const body2 = handler.body;
@@ -11493,16 +11495,17 @@ var no_silent_promise_catch_default = createRule({
11493
11495
  const [definition] = binding.defs;
11494
11496
  return binding.defs.length === 1 && definition?.node.type === import_utils65.AST_NODE_TYPES.VariableDeclarator && definition.node.init !== null && isZodSchema(definition.node.init, seen);
11495
11497
  }
11496
- if (node.type !== import_utils65.AST_NODE_TYPES.CallExpression || node.callee.type !== import_utils65.AST_NODE_TYPES.MemberExpression || node.callee.computed || node.callee.property.type !== import_utils65.AST_NODE_TYPES.Identifier) return false;
11497
- const { object, property } = node.callee;
11498
- if (object.type === import_utils65.AST_NODE_TYPES.Identifier && ZOD_CONSTRUCTORS.has(property.name)) {
11498
+ if (node.type !== import_utils65.AST_NODE_TYPES.CallExpression || node.callee.type !== import_utils65.AST_NODE_TYPES.MemberExpression || import_utils65.ASTUtils.getPropertyName(node.callee) === null) return false;
11499
+ const { object } = node.callee;
11500
+ const method = import_utils65.ASTUtils.getPropertyName(node.callee);
11501
+ if (object.type === import_utils65.AST_NODE_TYPES.Identifier && method !== null && ZOD_CONSTRUCTORS.has(method)) {
11499
11502
  const binding = import_utils65.ASTUtils.findVariable(context.sourceCode.getScope(object), object.name);
11500
11503
  if (binding?.defs.some((definition) => {
11501
11504
  const specifier = definition.node;
11502
11505
  return (specifier.type === import_utils65.AST_NODE_TYPES.ImportNamespaceSpecifier || specifier.type === import_utils65.AST_NODE_TYPES.ImportDefaultSpecifier || specifier.type === import_utils65.AST_NODE_TYPES.ImportSpecifier && specifier.imported.type === import_utils65.AST_NODE_TYPES.Identifier && specifier.imported.name === "z") && specifier.parent.type === import_utils65.AST_NODE_TYPES.ImportDeclaration && isZodModule(String(specifier.parent.source.value));
11503
11506
  })) return true;
11504
11507
  }
11505
- return ZOD_CHAIN_METHODS.has(property.name) && isZodSchema(object, seen);
11508
+ return method !== null && ZOD_CHAIN_METHODS.has(method) && isZodSchema(object, seen);
11506
11509
  }
11507
11510
  const hasExplanatoryComment = (call, handler) => {
11508
11511
  const sourceCode = context.sourceCode;
@@ -11522,10 +11525,10 @@ var no_silent_promise_catch_default = createRule({
11522
11525
  };
11523
11526
  return {
11524
11527
  CallExpression(node) {
11525
- if (node.callee.type !== import_utils65.AST_NODE_TYPES.MemberExpression || node.callee.computed || node.callee.property.type !== import_utils65.AST_NODE_TYPES.Identifier) {
11528
+ if (node.callee.type !== import_utils65.AST_NODE_TYPES.MemberExpression || import_utils65.ASTUtils.getPropertyName(node.callee) === null) {
11526
11529
  return;
11527
11530
  }
11528
- const method = node.callee.property.name;
11531
+ const method = import_utils65.ASTUtils.getPropertyName(node.callee) ?? "";
11529
11532
  const handlerIndex = method === "catch" ? 0 : method === "then" ? 1 : null;
11530
11533
  if (handlerIndex === null) return;
11531
11534
  if (method === "catch" && isZodSchema(node.callee.object)) return;
@@ -11538,7 +11541,7 @@ var no_silent_promise_catch_default = createRule({
11538
11541
  if (isCancelledWebShare(node.callee.object)) {
11539
11542
  return;
11540
11543
  }
11541
- if (node.parent.type === import_utils65.AST_NODE_TYPES.MemberExpression && node.parent.object === node && !node.parent.computed && node.parent.property.type === import_utils65.AST_NODE_TYPES.Identifier && node.parent.property.name === "then") {
11544
+ if (node.parent.type === import_utils65.AST_NODE_TYPES.MemberExpression && node.parent.object === node && import_utils65.ASTUtils.getPropertyName(node.parent) !== null && (import_utils65.ASTUtils.getPropertyName(node.parent) ?? "") === "then") {
11542
11545
  return;
11543
11546
  }
11544
11547
  const expectedArguments = method === "catch" ? 1 : 2;
@@ -11736,10 +11739,10 @@ var STORAGE_RECEIVER_WORDS = /* @__PURE__ */ new Set([
11736
11739
  ]);
11737
11740
  function storageMethodName(node, methods) {
11738
11741
  const callee = node.callee;
11739
- if (callee.type !== import_utils67.AST_NODE_TYPES.MemberExpression || callee.computed || callee.property.type !== import_utils67.AST_NODE_TYPES.Identifier) {
11742
+ if (callee.type !== import_utils67.AST_NODE_TYPES.MemberExpression || import_utils67.ASTUtils.getPropertyName(callee) === null) {
11740
11743
  return null;
11741
11744
  }
11742
- const name = callee.property.name;
11745
+ const name = import_utils67.ASTUtils.getPropertyName(callee) ?? "";
11743
11746
  if (!methods.has(name)) {
11744
11747
  return null;
11745
11748
  }
@@ -11759,7 +11762,7 @@ function isStorageLikeReceiver(node) {
11759
11762
  if (node.type !== import_utils67.AST_NODE_TYPES.MemberExpression) {
11760
11763
  return false;
11761
11764
  }
11762
- if (!node.computed && node.property.type === import_utils67.AST_NODE_TYPES.Identifier && isStorageIdentifier(node.property.name)) {
11765
+ if (import_utils67.ASTUtils.getPropertyName(node) !== null && isStorageIdentifier(import_utils67.ASTUtils.getPropertyName(node) ?? "")) {
11763
11766
  return true;
11764
11767
  }
11765
11768
  return isStorageLikeReceiver(node.object);
@@ -11837,7 +11840,7 @@ function hasSqlPreparationEvidence(node, callee) {
11837
11840
  if (!/^\s*(?:SELECT|WITH|INSERT|UPDATE|DELETE|REPLACE|CREATE|ALTER|DROP|PRAGMA|EXPLAIN)\b/iu.test(stripSqlNoise(text))) return false;
11838
11841
  } else {
11839
11842
  const receiver = callee.object;
11840
- const receiverName = receiver.type === import_utils67.AST_NODE_TYPES.Identifier ? receiver.name : receiver.type === import_utils67.AST_NODE_TYPES.MemberExpression && !receiver.computed && receiver.property.type === import_utils67.AST_NODE_TYPES.Identifier ? receiver.property.name : "";
11843
+ const receiverName = receiver.type === import_utils67.AST_NODE_TYPES.Identifier ? receiver.name : receiver.type === import_utils67.AST_NODE_TYPES.MemberExpression && import_utils67.ASTUtils.getPropertyName(receiver) !== null ? import_utils67.ASTUtils.getPropertyName(receiver) ?? "" : "";
11841
11844
  if (!/^(?:db|database|connection)$/iu.test(receiverName)) return false;
11842
11845
  }
11843
11846
  return true;
@@ -12231,13 +12234,13 @@ var no_tautological_expect_default = createRule({
12231
12234
  return {
12232
12235
  CallExpression(node) {
12233
12236
  const callee = node.callee;
12234
- if (callee.type !== import_utils69.AST_NODE_TYPES.MemberExpression || callee.computed) {
12237
+ if (callee.type !== import_utils69.AST_NODE_TYPES.MemberExpression || import_utils69.ASTUtils.getPropertyName(callee) === null) {
12235
12238
  return;
12236
12239
  }
12237
- if (callee.property.type !== import_utils69.AST_NODE_TYPES.Identifier) {
12240
+ if (import_utils69.ASTUtils.getPropertyName(callee) === null) {
12238
12241
  return;
12239
12242
  }
12240
- const matcher = callee.property.name;
12243
+ const matcher = import_utils69.ASTUtils.getPropertyName(callee) ?? "";
12241
12244
  if (callee.object.type !== import_utils69.AST_NODE_TYPES.CallExpression || callee.object.callee.type !== import_utils69.AST_NODE_TYPES.Identifier) return;
12242
12245
  const expectIdentifier = callee.object.callee;
12243
12246
  const variable = import_utils69.ASTUtils.findVariable(context.sourceCode.getScope(expectIdentifier), expectIdentifier.name);
@@ -13651,7 +13654,7 @@ function containsMockFactory(node, source) {
13651
13654
  return false;
13652
13655
  }
13653
13656
  function isMockFactory(node, source) {
13654
- return node.type === import_utils78.AST_NODE_TYPES.CallExpression && node.callee.type === import_utils78.AST_NODE_TYPES.MemberExpression && !node.callee.computed && node.callee.object.type === import_utils78.AST_NODE_TYPES.Identifier && (importedTestMockNamespace(source, node.callee.object) !== null || isUnshadowedTestMockGlobal(source, node.callee.object)) && node.callee.property.type === import_utils78.AST_NODE_TYPES.Identifier && ["fn", "spyOn"].includes(node.callee.property.name);
13657
+ return node.type === import_utils78.AST_NODE_TYPES.CallExpression && node.callee.type === import_utils78.AST_NODE_TYPES.MemberExpression && node.callee.object.type === import_utils78.AST_NODE_TYPES.Identifier && (importedTestMockNamespace(source, node.callee.object) !== null || isUnshadowedTestMockGlobal(source, node.callee.object)) && import_utils78.ASTUtils.getPropertyName(node.callee) !== null && ["fn", "spyOn"].includes(import_utils78.ASTUtils.getPropertyName(node.callee) ?? "");
13655
13658
  }
13656
13659
  var no_unsafe_test_double_cast_default = createRule({
13657
13660
  name: "no-unsafe-test-double-cast",
@@ -13706,7 +13709,7 @@ var no_first_party_module_mock_default = createRule({
13706
13709
  if (!isTestFile(context.filename) || isGeneratedFile(context.filename, context.sourceCode.text)) return {};
13707
13710
  return {
13708
13711
  CallExpression(node) {
13709
- if (node.callee.type !== import_utils79.AST_NODE_TYPES.MemberExpression || node.callee.computed || node.callee.object.type !== import_utils79.AST_NODE_TYPES.Identifier || node.callee.property.type !== import_utils79.AST_NODE_TYPES.Identifier || !["mock", "doMock"].includes(node.callee.property.name)) return;
13712
+ if (node.callee.type !== import_utils79.AST_NODE_TYPES.MemberExpression || node.callee.object.type !== import_utils79.AST_NODE_TYPES.Identifier || import_utils79.ASTUtils.getPropertyName(node.callee) === null || !["mock", "doMock"].includes(import_utils79.ASTUtils.getPropertyName(node.callee) ?? "")) return;
13710
13713
  const framework = importedTestMockNamespace(context.sourceCode, node.callee.object);
13711
13714
  if (framework === null || framework === "jest" && mayBeVirtual(node.arguments[2])) return;
13712
13715
  const argument = node.arguments[0];
@@ -14781,7 +14784,7 @@ var prefer_millisecond_control_duration_schema_default = createRule({
14781
14784
  const variable2 = binding(callee);
14782
14785
  return variable2 !== null && objectFactories.has(variable2);
14783
14786
  }
14784
- if (callee.type !== import_utils88.AST_NODE_TYPES.MemberExpression || callee.computed || callee.object.type !== import_utils88.AST_NODE_TYPES.Identifier || callee.property.type !== import_utils88.AST_NODE_TYPES.Identifier || callee.property.name !== "object" && callee.property.name !== "strictObject") {
14787
+ if (callee.type !== import_utils88.AST_NODE_TYPES.MemberExpression || callee.object.type !== import_utils88.AST_NODE_TYPES.Identifier || import_utils88.ASTUtils.getPropertyName(callee) === null || (import_utils88.ASTUtils.getPropertyName(callee) ?? "") !== "object" && (import_utils88.ASTUtils.getPropertyName(callee) ?? "") !== "strictObject") {
14785
14788
  return false;
14786
14789
  }
14787
14790
  const variable = binding(callee.object);
@@ -14794,12 +14797,12 @@ var prefer_millisecond_control_duration_schema_default = createRule({
14794
14797
  const variable = binding(callee);
14795
14798
  return variable !== null && numberFactories.has(variable);
14796
14799
  }
14797
- if (callee.type !== import_utils88.AST_NODE_TYPES.MemberExpression || callee.computed || callee.property.type !== import_utils88.AST_NODE_TYPES.Identifier) return false;
14800
+ if (callee.type !== import_utils88.AST_NODE_TYPES.MemberExpression || import_utils88.ASTUtils.getPropertyName(callee) === null) return false;
14798
14801
  if (callee.object.type === import_utils88.AST_NODE_TYPES.Identifier) {
14799
14802
  const variable = binding(callee.object);
14800
- return callee.property.name === "number" && variable !== null && zodNamespaces.has(variable);
14803
+ return (import_utils88.ASTUtils.getPropertyName(callee) ?? "") === "number" && variable !== null && zodNamespaces.has(variable);
14801
14804
  }
14802
- return ["int", "min", "max", "positive", "nonnegative", "finite", "multipleOf", "optional", "nullable", "nullish", "default", "describe", "brand", "readonly"].includes(callee.property.name) && isNumericSchema(callee.object);
14805
+ return ["int", "min", "max", "positive", "nonnegative", "finite", "multipleOf", "optional", "nullable", "nullish", "default", "describe", "brand", "readonly"].includes(import_utils88.ASTUtils.getPropertyName(callee) ?? "") && isNumericSchema(callee.object);
14803
14806
  }
14804
14807
  return {
14805
14808
  ImportDeclaration(node) {
@@ -15984,7 +15987,7 @@ function schemaExpression(node) {
15984
15987
  if (parent === void 0) {
15985
15988
  return current;
15986
15989
  }
15987
- if (parent.type === import_utils92.AST_NODE_TYPES.MemberExpression && parent.object === current && !parent.computed && parent.property.type === import_utils92.AST_NODE_TYPES.Identifier && TERMINAL_METHODS.has(parent.property.name)) {
15990
+ if (parent.type === import_utils92.AST_NODE_TYPES.MemberExpression && parent.object === current && import_utils92.ASTUtils.getPropertyName(parent) !== null && TERMINAL_METHODS.has(import_utils92.ASTUtils.getPropertyName(parent) ?? "")) {
15988
15991
  return current;
15989
15992
  }
15990
15993
  if (parent.type === import_utils92.AST_NODE_TYPES.MemberExpression && parent.object === current || parent.type === import_utils92.AST_NODE_TYPES.CallExpression && parent.callee === current || parent.type === import_utils92.AST_NODE_TYPES.TSAsExpression && parent.expression === current || parent.type === import_utils92.AST_NODE_TYPES.TSNonNullExpression && parent.expression === current) {
@@ -16054,7 +16057,7 @@ function buildsLocalizedText(node) {
16054
16057
  if (callee.type === import_utils92.AST_NODE_TYPES.Identifier) {
16055
16058
  return I18N_CALLEE_NAMES.has(callee.name);
16056
16059
  }
16057
- return callee.type === import_utils92.AST_NODE_TYPES.MemberExpression && !callee.computed && callee.object.type === import_utils92.AST_NODE_TYPES.Identifier && I18N_RECEIVER_NAMES.has(callee.object.name);
16060
+ return callee.type === import_utils92.AST_NODE_TYPES.MemberExpression && callee.object.type === import_utils92.AST_NODE_TYPES.Identifier && I18N_RECEIVER_NAMES.has(callee.object.name);
16058
16061
  });
16059
16062
  }
16060
16063
  function collectReferences(scope, out) {
@@ -16118,13 +16121,13 @@ var prefer_module_level_schema_default = createRule({
16118
16121
  }
16119
16122
  const zodNamespaces = /* @__PURE__ */ new Set();
16120
16123
  function isZodCall(node) {
16121
- return node.type === import_utils92.AST_NODE_TYPES.CallExpression && node.callee.type === import_utils92.AST_NODE_TYPES.MemberExpression && !node.callee.computed && node.callee.object.type === import_utils92.AST_NODE_TYPES.Identifier && zodNamespaces.has(node.callee.object.name);
16124
+ return node.type === import_utils92.AST_NODE_TYPES.CallExpression && node.callee.type === import_utils92.AST_NODE_TYPES.MemberExpression && import_utils92.ASTUtils.getPropertyName(node.callee) !== null && node.callee.object.type === import_utils92.AST_NODE_TYPES.Identifier && zodNamespaces.has(node.callee.object.name);
16122
16125
  }
16123
16126
  function isSchemaConstruction(node) {
16124
16127
  const callee = node.callee;
16125
- if (callee.type !== import_utils92.AST_NODE_TYPES.MemberExpression || callee.computed || callee.property.type !== import_utils92.AST_NODE_TYPES.Identifier || TERMINAL_METHODS.has(callee.property.name)) return false;
16128
+ if (callee.type !== import_utils92.AST_NODE_TYPES.MemberExpression || import_utils92.ASTUtils.getPropertyName(callee) === null || TERMINAL_METHODS.has(import_utils92.ASTUtils.getPropertyName(callee) ?? "")) return false;
16126
16129
  if (callee.object.type === import_utils92.AST_NODE_TYPES.CallExpression) return isSchemaConstruction(callee.object);
16127
- return isZodCall(node) && CONSTRUCTION_FACTORIES.has(callee.property.name);
16130
+ return isZodCall(node) && CONSTRUCTION_FACTORIES.has(import_utils92.ASTUtils.getPropertyName(callee) ?? "");
16128
16131
  }
16129
16132
  function hasEagerComputation(node) {
16130
16133
  return subtreeSome(node, (inner) => inner.type === import_utils92.AST_NODE_TYPES.NewExpression || inner.type === import_utils92.AST_NODE_TYPES.TaggedTemplateExpression || inner.type === import_utils92.AST_NODE_TYPES.CallExpression && !isSchemaConstruction(inner), true);
@@ -16132,10 +16135,10 @@ var prefer_module_level_schema_default = createRule({
16132
16135
  function isCovered(node) {
16133
16136
  let current = node.parent ?? void 0;
16134
16137
  while (current !== void 0) {
16135
- if (current !== node && isZodCall(current) && current.callee.type === import_utils92.AST_NODE_TYPES.MemberExpression && current.callee.property.type === import_utils92.AST_NODE_TYPES.Identifier && factories.has(current.callee.property.name)) {
16138
+ if (current !== node && isZodCall(current) && current.callee.type === import_utils92.AST_NODE_TYPES.MemberExpression && import_utils92.ASTUtils.getPropertyName(current.callee) !== null && factories.has(import_utils92.ASTUtils.getPropertyName(current.callee) ?? "")) {
16136
16139
  return true;
16137
16140
  }
16138
- if (current.type === import_utils92.AST_NODE_TYPES.CallExpression && (current.callee.type === import_utils92.AST_NODE_TYPES.Identifier && memoCallees.has(current.callee.name) || current.callee.type === import_utils92.AST_NODE_TYPES.MemberExpression && !current.callee.computed && current.callee.property.type === import_utils92.AST_NODE_TYPES.Identifier && memoCallees.has(current.callee.property.name))) {
16141
+ if (current.type === import_utils92.AST_NODE_TYPES.CallExpression && (current.callee.type === import_utils92.AST_NODE_TYPES.Identifier && memoCallees.has(current.callee.name) || current.callee.type === import_utils92.AST_NODE_TYPES.MemberExpression && import_utils92.ASTUtils.getPropertyName(current.callee) !== null && memoCallees.has(import_utils92.ASTUtils.getPropertyName(current.callee) ?? ""))) {
16139
16142
  return true;
16140
16143
  }
16141
16144
  current = current.parent ?? void 0;
@@ -16164,7 +16167,7 @@ var prefer_module_level_schema_default = createRule({
16164
16167
  }
16165
16168
  function isSchemaComposition(node) {
16166
16169
  const { callee } = node;
16167
- const isCombinator = callee.type === import_utils92.AST_NODE_TYPES.MemberExpression && !callee.computed && callee.property.type === import_utils92.AST_NODE_TYPES.Identifier && ZOD_COMBINATOR_METHODS.has(callee.property.name);
16170
+ const isCombinator = callee.type === import_utils92.AST_NODE_TYPES.MemberExpression && import_utils92.ASTUtils.getPropertyName(callee) !== null && ZOD_COMBINATOR_METHODS.has(import_utils92.ASTUtils.getPropertyName(callee) ?? "");
16168
16171
  return isCombinator || isZodCall(node);
16169
16172
  }
16170
16173
  function closesOverNothing(node, enclosing) {
@@ -16236,10 +16239,10 @@ var prefer_module_level_schema_default = createRule({
16236
16239
  return;
16237
16240
  }
16238
16241
  const callee = node.callee;
16239
- if (callee.property.type !== import_utils92.AST_NODE_TYPES.Identifier) {
16242
+ if (import_utils92.ASTUtils.getPropertyName(callee) === null) {
16240
16243
  return;
16241
16244
  }
16242
- const factory = callee.property.name;
16245
+ const factory = import_utils92.ASTUtils.getPropertyName(callee) ?? "";
16243
16246
  if (!factories.has(factory)) {
16244
16247
  return;
16245
16248
  }
@@ -16480,7 +16483,7 @@ function buildsLocalizedText2(node) {
16480
16483
  const { callee } = inner;
16481
16484
  if (callee.type === import_utils93.AST_NODE_TYPES.Identifier)
16482
16485
  return I18N_CALLEE_NAMES2.has(callee.name);
16483
- return callee.type === import_utils93.AST_NODE_TYPES.MemberExpression && !callee.computed && callee.object.type === import_utils93.AST_NODE_TYPES.Identifier && I18N_RECEIVER_NAMES2.has(callee.object.name);
16486
+ return callee.type === import_utils93.AST_NODE_TYPES.MemberExpression && callee.object.type === import_utils93.AST_NODE_TYPES.Identifier && I18N_RECEIVER_NAMES2.has(callee.object.name);
16484
16487
  });
16485
16488
  }
16486
16489
  function calleeChainRoot(node) {
@@ -16503,9 +16506,9 @@ function chainMemberNames(node) {
16503
16506
  let current = node;
16504
16507
  for (; ; ) {
16505
16508
  if (current.type === import_utils93.AST_NODE_TYPES.MemberExpression) {
16506
- if (current.computed || current.property.type !== import_utils93.AST_NODE_TYPES.Identifier)
16509
+ if (import_utils93.ASTUtils.getPropertyName(current) === null)
16507
16510
  return [];
16508
- names.push(current.property.name);
16511
+ names.push(import_utils93.ASTUtils.getPropertyName(current) ?? "");
16509
16512
  current = current.object;
16510
16513
  continue;
16511
16514
  }
@@ -16522,8 +16525,8 @@ function schemaExpression2(node) {
16522
16525
  let current = node;
16523
16526
  for (; ; ) {
16524
16527
  const parent = current.parent ?? void 0;
16525
- if (parent?.type === import_utils93.AST_NODE_TYPES.MemberExpression && parent.object === current && !parent.computed && parent.property.type === import_utils93.AST_NODE_TYPES.Identifier && parent.parent?.type === import_utils93.AST_NODE_TYPES.CallExpression && parent.parent.callee === parent) {
16526
- if (NON_SCHEMA_TERMINALS.has(parent.property.name)) return current;
16528
+ if (parent?.type === import_utils93.AST_NODE_TYPES.MemberExpression && parent.object === current && import_utils93.ASTUtils.getPropertyName(parent) !== null && parent.parent?.type === import_utils93.AST_NODE_TYPES.CallExpression && parent.parent.callee === parent) {
16529
+ if (NON_SCHEMA_TERMINALS.has(import_utils93.ASTUtils.getPropertyName(parent) ?? "")) return current;
16527
16530
  current = parent.parent;
16528
16531
  continue;
16529
16532
  }
@@ -16577,7 +16580,7 @@ var prefer_module_level_refined_schema_default = createRule({
16577
16580
  }
16578
16581
  function isSchemaConstruction(node) {
16579
16582
  const callee = node.callee;
16580
- if (callee.type !== import_utils93.AST_NODE_TYPES.MemberExpression || callee.computed || callee.property.type !== import_utils93.AST_NODE_TYPES.Identifier || NON_SCHEMA_TERMINALS.has(callee.property.name)) return false;
16583
+ if (callee.type !== import_utils93.AST_NODE_TYPES.MemberExpression || import_utils93.ASTUtils.getPropertyName(callee) === null || NON_SCHEMA_TERMINALS.has(import_utils93.ASTUtils.getPropertyName(callee) ?? "")) return false;
16581
16584
  if (callee.object.type === import_utils93.AST_NODE_TYPES.CallExpression) return isSchemaConstruction(callee.object);
16582
16585
  return factoryName(node, FACTORIES) !== null || factoryName(node, COMPOSITE_FACTORIES) !== null;
16583
16586
  }
@@ -16604,7 +16607,7 @@ var prefer_module_level_refined_schema_default = createRule({
16604
16607
  function isMemoized(node) {
16605
16608
  let current = node.parent ?? void 0;
16606
16609
  while (current !== void 0) {
16607
- if (current.type === import_utils93.AST_NODE_TYPES.CallExpression && (current.callee.type === import_utils93.AST_NODE_TYPES.Identifier && MEMO_CALLEES2.has(current.callee.name) || current.callee.type === import_utils93.AST_NODE_TYPES.MemberExpression && !current.callee.computed && current.callee.property.type === import_utils93.AST_NODE_TYPES.Identifier && MEMO_CALLEES2.has(current.callee.property.name)))
16610
+ if (current.type === import_utils93.AST_NODE_TYPES.CallExpression && (current.callee.type === import_utils93.AST_NODE_TYPES.Identifier && MEMO_CALLEES2.has(current.callee.name) || current.callee.type === import_utils93.AST_NODE_TYPES.MemberExpression && import_utils93.ASTUtils.getPropertyName(current.callee) !== null && MEMO_CALLEES2.has(import_utils93.ASTUtils.getPropertyName(current.callee) ?? "")))
16608
16611
  return true;
16609
16612
  current = current.parent ?? void 0;
16610
16613
  }
@@ -16755,7 +16758,7 @@ var prefer_multi_value_zod_literal_default = createRule({
16755
16758
  );
16756
16759
  }
16757
16760
  function directMemberCall(node, binding, method) {
16758
- if (node.callee.type !== import_utils94.AST_NODE_TYPES.MemberExpression || node.callee.computed || node.callee.object.type !== import_utils94.AST_NODE_TYPES.Identifier || node.callee.property.type !== import_utils94.AST_NODE_TYPES.Identifier || node.callee.property.name !== method)
16761
+ if (node.callee.type !== import_utils94.AST_NODE_TYPES.MemberExpression || node.callee.object.type !== import_utils94.AST_NODE_TYPES.Identifier || import_utils94.ASTUtils.getPropertyName(node.callee) === null || (import_utils94.ASTUtils.getPropertyName(node.callee) ?? "") !== method)
16759
16762
  return false;
16760
16763
  return resolvedBinding(node.callee.object) === binding;
16761
16764
  }
@@ -17780,7 +17783,7 @@ var prefer_nullish_filter_predicate_default = createRule({
17780
17783
  CallExpression(node) {
17781
17784
  const callee = node.callee;
17782
17785
  const callback = node.arguments[0];
17783
- if (node.arguments.length !== 1 || callback?.type !== import_utils102.AST_NODE_TYPES.Identifier || callback.name !== "Boolean" || callee.type !== import_utils102.AST_NODE_TYPES.MemberExpression || callee.computed || callee.property.type !== import_utils102.AST_NODE_TYPES.Identifier || callee.property.name !== "filter" || !isUnshadowedBoolean(callback, context) || !isBuiltinArrayFilter(callee, services)) return;
17786
+ if (node.arguments.length !== 1 || callback?.type !== import_utils102.AST_NODE_TYPES.Identifier || callback.name !== "Boolean" || callee.type !== import_utils102.AST_NODE_TYPES.MemberExpression || import_utils102.ASTUtils.getPropertyName(callee) === null || (import_utils102.ASTUtils.getPropertyName(callee) ?? "") !== "filter" || !isUnshadowedBoolean(callback, context) || !isBuiltinArrayFilter(callee, services)) return;
17784
17787
  const elementType = arrayElementType(callee.object, services);
17785
17788
  const checker = services.program.getTypeChecker();
17786
17789
  if (elementType === null || !isNullishPlusTruthy(elementType, checker)) return;
@@ -17862,7 +17865,7 @@ function isRuntimeFunction(node) {
17862
17865
  }
17863
17866
  function promiseThenReceiver(node) {
17864
17867
  const callee = node.callee;
17865
- if (callee.type !== import_utils103.AST_NODE_TYPES.MemberExpression || callee.computed || callee.optional || callee.property.type !== import_utils103.AST_NODE_TYPES.Identifier || callee.property.name !== "then" || node.optional || node.arguments.length !== 1) {
17868
+ if (callee.type !== import_utils103.AST_NODE_TYPES.MemberExpression || callee.optional || import_utils103.ASTUtils.getPropertyName(callee) === null || (import_utils103.ASTUtils.getPropertyName(callee) ?? "") !== "then" || node.optional || node.arguments.length !== 1) {
17866
17869
  return null;
17867
17870
  }
17868
17871
  const callback = node.arguments[0];
@@ -18011,7 +18014,7 @@ var PROMISE_CHAIN_METHODS = /* @__PURE__ */ new Set([
18011
18014
  ]);
18012
18015
  var isSchemaParseReference = (node) => {
18013
18016
  const inner = unwrap6(node);
18014
- return inner !== null && inner.type === import_utils104.AST_NODE_TYPES.MemberExpression && !inner.computed && inner.property.type === import_utils104.AST_NODE_TYPES.Identifier && (inner.property.name === "parse" || inner.property.name === "safeParse");
18017
+ return inner !== null && inner.type === import_utils104.AST_NODE_TYPES.MemberExpression && import_utils104.ASTUtils.getPropertyName(inner) !== null && ((import_utils104.ASTUtils.getPropertyName(inner) ?? "") === "parse" || (import_utils104.ASTUtils.getPropertyName(inner) ?? "") === "safeParse");
18015
18018
  };
18016
18019
  var isRawPayloadSource = (node, context, isKnownLocalText) => {
18017
18020
  let current = unwrap6(node);
@@ -18026,20 +18029,20 @@ var isRawPayloadSource = (node, context, isKnownLocalText) => {
18026
18029
  if (callee === null || callee.type !== import_utils104.AST_NODE_TYPES.MemberExpression) {
18027
18030
  return false;
18028
18031
  }
18029
- const property = unwrap6(callee.property);
18030
- if (property === null || property.type !== import_utils104.AST_NODE_TYPES.Identifier) {
18032
+ const property = import_utils104.ASTUtils.getPropertyName(callee);
18033
+ if (property === null) {
18031
18034
  return false;
18032
18035
  }
18033
- if (property.name === "json") {
18034
- return !callee.computed && current.arguments.length === 0 && isResponseSource(callee.object, context);
18036
+ if (property === "json") {
18037
+ return current.arguments.length === 0 && isResponseSource(callee.object, context);
18035
18038
  }
18036
- if (PROMISE_CHAIN_METHODS.has(property.name)) {
18039
+ if (PROMISE_CHAIN_METHODS.has(property)) {
18037
18040
  return !current.arguments.some(isSchemaParseReference) && isRawPayloadSource(callee.object, context, isKnownLocalText);
18038
18041
  }
18039
18042
  const object = unwrap6(callee.object);
18040
18043
  const input = unwrap6(current.arguments[0]);
18041
- if (input?.type === import_utils104.AST_NODE_TYPES.CallExpression && input.arguments.length === 1 && input.callee.type === import_utils104.AST_NODE_TYPES.MemberExpression && !input.callee.computed && input.callee.object.type === import_utils104.AST_NODE_TYPES.Identifier && input.callee.object.name === "JSON" && input.callee.property.type === import_utils104.AST_NODE_TYPES.Identifier && input.callee.property.name === "stringify" && (import_utils104.ASTUtils.findVariable(context.sourceCode.getScope(input.callee.object), "JSON")?.defs.length ?? 0) === 0) return false;
18042
- return property.name === "parse" && object !== null && object.type === import_utils104.AST_NODE_TYPES.Identifier && object.name === "JSON" && (import_utils104.ASTUtils.findVariable(context.sourceCode.getScope(object), "JSON")?.defs.length ?? 0) === 0 && !isLocalFileRead(current.arguments[0]) && isKnownLocalText?.(current.arguments[0]) !== true;
18044
+ if (input?.type === import_utils104.AST_NODE_TYPES.CallExpression && input.arguments.length === 1 && input.callee.type === import_utils104.AST_NODE_TYPES.MemberExpression && input.callee.object.type === import_utils104.AST_NODE_TYPES.Identifier && input.callee.object.name === "JSON" && import_utils104.ASTUtils.getPropertyName(input.callee) !== null && (import_utils104.ASTUtils.getPropertyName(input.callee) ?? "") === "stringify" && (import_utils104.ASTUtils.findVariable(context.sourceCode.getScope(input.callee.object), "JSON")?.defs.length ?? 0) === 0) return false;
18045
+ return property === "parse" && object !== null && object.type === import_utils104.AST_NODE_TYPES.Identifier && object.name === "JSON" && (import_utils104.ASTUtils.findVariable(context.sourceCode.getScope(object), "JSON")?.defs.length ?? 0) === 0 && !isLocalFileRead(current.arguments[0]) && isKnownLocalText?.(current.arguments[0]) !== true;
18043
18046
  };
18044
18047
  var isResponseSource = (node, context, seen = /* @__PURE__ */ new Set()) => {
18045
18048
  let current = unwrap6(node);
@@ -18065,7 +18068,7 @@ var isDirectLocalFileRead = (node) => {
18065
18068
  }
18066
18069
  if (current?.type !== import_utils104.AST_NODE_TYPES.CallExpression) return false;
18067
18070
  const callee = unwrap6(current.callee);
18068
- const name = callee?.type === import_utils104.AST_NODE_TYPES.Identifier ? callee.name : callee?.type === import_utils104.AST_NODE_TYPES.MemberExpression && !callee.computed && callee.property.type === import_utils104.AST_NODE_TYPES.Identifier ? callee.property.name : null;
18071
+ const name = callee?.type === import_utils104.AST_NODE_TYPES.Identifier ? callee.name : callee?.type === import_utils104.AST_NODE_TYPES.MemberExpression && import_utils104.ASTUtils.getPropertyName(callee) !== null ? import_utils104.ASTUtils.getPropertyName(callee) ?? "" : null;
18069
18072
  return name !== null && FILE_READ_RE.test(name);
18070
18073
  };
18071
18074
  var isLocalFileRead = (node) => {
@@ -18126,7 +18129,7 @@ var isValidationRead = (node) => {
18126
18129
  return false;
18127
18130
  }
18128
18131
  const callee = parent.callee;
18129
- if (callee.type === import_utils104.AST_NODE_TYPES.MemberExpression && !callee.computed && callee.object.type === import_utils104.AST_NODE_TYPES.Identifier && callee.object.name === "Array" && callee.property.type === import_utils104.AST_NODE_TYPES.Identifier && callee.property.name === "isArray") {
18132
+ if (callee.type === import_utils104.AST_NODE_TYPES.MemberExpression && callee.object.type === import_utils104.AST_NODE_TYPES.Identifier && callee.object.name === "Array" && import_utils104.ASTUtils.getPropertyName(callee) !== null && (import_utils104.ASTUtils.getPropertyName(callee) ?? "") === "isArray") {
18130
18133
  return parent.arguments.length === 1;
18131
18134
  }
18132
18135
  return callee.type === import_utils104.AST_NODE_TYPES.Identifier && GUARD_NAME_RE.test(callee.name);
@@ -18154,9 +18157,9 @@ var bindingValidationPolarity = (test, bindingName) => {
18154
18157
  }
18155
18158
  return test.operator === "!==" || test.operator === "!=" ? "valid-when-false" : null;
18156
18159
  }
18157
- return test.type === import_utils104.AST_NODE_TYPES.CallExpression && test.arguments.length === 1 && test.arguments[0]?.type === import_utils104.AST_NODE_TYPES.Identifier && test.arguments[0].name === bindingName && test.callee.type === import_utils104.AST_NODE_TYPES.MemberExpression && !test.callee.computed && test.callee.object.type === import_utils104.AST_NODE_TYPES.Identifier && test.callee.object.name === "Array" && test.callee.property.type === import_utils104.AST_NODE_TYPES.Identifier && test.callee.property.name === "isArray" ? "valid-when-true" : null;
18160
+ return test.type === import_utils104.AST_NODE_TYPES.CallExpression && test.arguments.length === 1 && test.arguments[0]?.type === import_utils104.AST_NODE_TYPES.Identifier && test.arguments[0].name === bindingName && test.callee.type === import_utils104.AST_NODE_TYPES.MemberExpression && test.callee.object.type === import_utils104.AST_NODE_TYPES.Identifier && test.callee.object.name === "Array" && import_utils104.ASTUtils.getPropertyName(test.callee) !== null && (import_utils104.ASTUtils.getPropertyName(test.callee) ?? "") === "isArray" ? "valid-when-true" : null;
18158
18161
  };
18159
- var plainMemberAccess = (node) => node.type === import_utils104.AST_NODE_TYPES.MemberExpression && !node.computed && node.object.type === import_utils104.AST_NODE_TYPES.Identifier && node.property.type === import_utils104.AST_NODE_TYPES.Identifier ? { object: node.object.name, property: node.property.name } : null;
18162
+ var plainMemberAccess = (node) => node.type === import_utils104.AST_NODE_TYPES.MemberExpression && node.object.type === import_utils104.AST_NODE_TYPES.Identifier && import_utils104.ASTUtils.getPropertyName(node) !== null ? { object: node.object.name, property: import_utils104.ASTUtils.getPropertyName(node) ?? "" } : null;
18160
18163
  var isSamePlainMember = (node, access) => {
18161
18164
  const candidate2 = plainMemberAccess(node);
18162
18165
  return candidate2 !== null && candidate2.object === access.object && candidate2.property === access.property;
@@ -18218,7 +18221,7 @@ var memberValidationPolarity = (test, access) => {
18218
18221
  }
18219
18222
  return test.operator === "!==" || test.operator === "!=" ? "valid-when-false" : null;
18220
18223
  }
18221
- return test.type === import_utils104.AST_NODE_TYPES.CallExpression && test.arguments.length === 1 && test.arguments[0] !== void 0 && test.arguments[0].type !== import_utils104.AST_NODE_TYPES.SpreadElement && isSamePlainMember(test.arguments[0], access) && test.callee.type === import_utils104.AST_NODE_TYPES.MemberExpression && !test.callee.computed && test.callee.object.type === import_utils104.AST_NODE_TYPES.Identifier && test.callee.object.name === "Array" && test.callee.property.type === import_utils104.AST_NODE_TYPES.Identifier && test.callee.property.name === "isArray" ? "valid-when-true" : null;
18224
+ return test.type === import_utils104.AST_NODE_TYPES.CallExpression && test.arguments.length === 1 && test.arguments[0] !== void 0 && test.arguments[0].type !== import_utils104.AST_NODE_TYPES.SpreadElement && isSamePlainMember(test.arguments[0], access) && test.callee.type === import_utils104.AST_NODE_TYPES.MemberExpression && test.callee.object.type === import_utils104.AST_NODE_TYPES.Identifier && test.callee.object.name === "Array" && import_utils104.ASTUtils.getPropertyName(test.callee) !== null && (import_utils104.ASTUtils.getPropertyName(test.callee) ?? "") === "isArray" ? "valid-when-true" : null;
18222
18225
  };
18223
18226
  var isFullyValidatedExtractedBinding = (member, source, context) => {
18224
18227
  const isValidationReference = (identifier) => {
@@ -18501,7 +18504,7 @@ var prefer_schema_for_api_payload_default = createRule({
18501
18504
  (candidate2) => localFileTextRef(candidate2, scope) !== null
18502
18505
  )) {
18503
18506
  const parent = node.parent;
18504
- if (parent.type === import_utils104.AST_NODE_TYPES.CallExpression && parent.callee === node && node.property.type === import_utils104.AST_NODE_TYPES.Identifier && (node.property.name === "parse" || node.property.name === "safeParse" || PROMISE_CHAIN_METHODS.has(node.property.name))) {
18507
+ if (parent.type === import_utils104.AST_NODE_TYPES.CallExpression && parent.callee === node && import_utils104.ASTUtils.getPropertyName(node) !== null && ((import_utils104.ASTUtils.getPropertyName(node) ?? "") === "parse" || (import_utils104.ASTUtils.getPropertyName(node) ?? "") === "safeParse" || PROMISE_CHAIN_METHODS.has(import_utils104.ASTUtils.getPropertyName(node) ?? ""))) {
18505
18508
  return;
18506
18509
  }
18507
18510
  context.report({ node, messageId: "unparsedJsonAccess" });
@@ -18616,7 +18619,7 @@ var prefer_shared_zod_enum_default = createRule({
18616
18619
  }
18617
18620
  },
18618
18621
  CallExpression(node) {
18619
- if (node.callee.type !== import_utils105.AST_NODE_TYPES.MemberExpression || node.callee.computed || node.callee.object.type !== import_utils105.AST_NODE_TYPES.Identifier || node.callee.property.type !== import_utils105.AST_NODE_TYPES.Identifier || node.callee.property.name !== "enum") return;
18622
+ if (node.callee.type !== import_utils105.AST_NODE_TYPES.MemberExpression || node.callee.object.type !== import_utils105.AST_NODE_TYPES.Identifier || import_utils105.ASTUtils.getPropertyName(node.callee) === null || (import_utils105.ASTUtils.getPropertyName(node.callee) ?? "") !== "enum") return;
18620
18623
  const binding = bindingOf(node.callee.object);
18621
18624
  if (binding === null || !zodBindings.has(binding)) return;
18622
18625
  const domain = literalDomain(node);
@@ -19493,8 +19496,7 @@ var prefer_server_actions_default = createRule({
19493
19496
  var import_utils109 = require("@typescript-eslint/utils");
19494
19497
  var MERGEABLE_MATCHERS = /* @__PURE__ */ new Set(["toBe", "toEqual", "toStrictEqual"]);
19495
19498
  var SYNTHETIC_LITERAL_MATCHERS = /* @__PURE__ */ new Map([
19496
- ["toBeNull", "null"],
19497
- ["toBeUndefined", "undefined"]
19499
+ ["toBeNull", "null"]
19498
19500
  ]);
19499
19501
  var ARRAY_MATCHERS = /* @__PURE__ */ new Set(["toEqual", "toStrictEqual"]);
19500
19502
  var COLLECTION_PROPERTIES = /* @__PURE__ */ new Set(["length", "size"]);
@@ -19509,7 +19511,7 @@ var PREFER_WHOLE_OBJECT_ASSERTION_DOCUMENTATION = {
19509
19511
  category: "testing",
19510
19512
  aliases: ["strict-test-assertions"],
19511
19513
  autofix: "none",
19512
- limitations: ["No automatic rewrite: whole-object matching can require previously absent properties and change observable getter or proxy reads."],
19514
+ limitations: ["Undefined-property assertions are excluded because whole-object matching can require previously absent properties. No automatic rewrite: grouping can change observable getter or proxy reads."],
19513
19515
  examples: [
19514
19516
  { id: "whole-object", title: "Assert the object once", outcome: "no-match", files: [{ path: "src/user.test.ts", source: "expect(user).toMatchObject({ id: 1, name: 'Ada' });" }], focusPath: "src/user.test.ts", expectedCount: 0, public: true },
19515
19517
  { id: "member-run", title: "Consider grouping related data properties", outcome: "match", files: [{ path: "src/user.test.ts", source: "expect(user.id).toBe(1);\nexpect(user.name).toBe('Ada');" }], focusPath: "src/user.test.ts", expectedCount: 1, public: true }
@@ -19553,9 +19555,9 @@ function literalIndex(node) {
19553
19555
  function propertyAccess(node) {
19554
19556
  const path = [];
19555
19557
  let current = node;
19556
- while (current.type === import_utils109.AST_NODE_TYPES.MemberExpression && !current.computed && !current.optional) {
19557
- if (current.property.type !== import_utils109.AST_NODE_TYPES.Identifier || COLLECTION_PROPERTIES.has(current.property.name) || LITERAL_KEY_HAZARDS.has(current.property.name)) return null;
19558
- path.unshift(current.property.name);
19558
+ while (current.type === import_utils109.AST_NODE_TYPES.MemberExpression && !current.optional) {
19559
+ if (import_utils109.ASTUtils.getPropertyName(current) === null || COLLECTION_PROPERTIES.has(import_utils109.ASTUtils.getPropertyName(current) ?? "") || LITERAL_KEY_HAZARDS.has(import_utils109.ASTUtils.getPropertyName(current) ?? "")) return null;
19560
+ path.unshift(import_utils109.ASTUtils.getPropertyName(current) ?? "");
19559
19561
  current = current.object;
19560
19562
  }
19561
19563
  return path.length > 0 && isPureReceiver(current) ? { receiver: current, path } : null;
@@ -19629,7 +19631,7 @@ var prefer_whole_object_assertion_default = createRule({
19629
19631
  if (first === void 0) {
19630
19632
  return;
19631
19633
  }
19632
- const receiverText = `${sourceCode.getText(first.receiver)}${commonPrefix.map((name) => `.${name}`).join("")}`;
19634
+ const receiverText = `${sourceCode.getText(first.receiver)}${commonPrefix.map((name) => /^[A-Za-z_$][\w$]*$/u.test(name) ? `.${name}` : `[${JSON.stringify(name)}]`).join("")}`;
19633
19635
  context.report({
19634
19636
  node: first.statement,
19635
19637
  messageId: "combineAssertions",
@@ -19698,10 +19700,10 @@ var prefer_whole_object_assertion_default = createRule({
19698
19700
  return null;
19699
19701
  }
19700
19702
  const callee = call.callee;
19701
- if (callee.type !== import_utils109.AST_NODE_TYPES.MemberExpression || callee.computed || callee.property.type !== import_utils109.AST_NODE_TYPES.Identifier) {
19703
+ if (callee.type !== import_utils109.AST_NODE_TYPES.MemberExpression || import_utils109.ASTUtils.getPropertyName(callee) === null) {
19702
19704
  return null;
19703
19705
  }
19704
- const matcher = callee.property.name;
19706
+ const matcher = import_utils109.ASTUtils.getPropertyName(callee) ?? "";
19705
19707
  const expectCall = callee.object;
19706
19708
  if (expectCall.type !== import_utils109.AST_NODE_TYPES.CallExpression || expectCall.callee.type !== import_utils109.AST_NODE_TYPES.Identifier || expectCall.callee.name !== "expect" || expectCall.arguments.length !== 1) {
19707
19709
  return null;
@@ -19716,11 +19718,8 @@ var prefer_whole_object_assertion_default = createRule({
19716
19718
  }
19717
19719
  let key;
19718
19720
  let receiver;
19719
- if (actual.computed) {
19720
- const index = literalIndex(actual.property);
19721
- if (index === null) {
19722
- return null;
19723
- }
19721
+ const index = actual.computed ? literalIndex(actual.property) : null;
19722
+ if (index !== null) {
19724
19723
  key = { kind: "index", index };
19725
19724
  receiver = actual.object;
19726
19725
  } else {
@@ -19796,7 +19795,7 @@ var EXPECT_MODIFIERS = /* @__PURE__ */ new Set(["not", "rejects", "resolves"]);
19796
19795
  var SNAPSHOT_MATCHERS = /snapshot/iu;
19797
19796
  var MIN_CASES2 = 3;
19798
19797
  function staticMemberName7(node) {
19799
- if (!node.computed && node.property.type === import_utils110.AST_NODE_TYPES.Identifier) return node.property.name;
19798
+ if (import_utils110.ASTUtils.getPropertyName(node) !== null) return import_utils110.ASTUtils.getPropertyName(node) ?? "";
19800
19799
  if (node.computed && node.property.type === import_utils110.AST_NODE_TYPES.Literal && typeof node.property.value === "string") return node.property.value;
19801
19800
  return null;
19802
19801
  }
@@ -19866,8 +19865,8 @@ function staticShape(node) {
19866
19865
  function assertionShape(statement, context, callback) {
19867
19866
  if (statement.type !== import_utils110.AST_NODE_TYPES.ExpressionStatement || statement.expression.type !== import_utils110.AST_NODE_TYPES.CallExpression) return null;
19868
19867
  const matcherCall = statement.expression;
19869
- if (matcherCall.callee.type !== import_utils110.AST_NODE_TYPES.MemberExpression || matcherCall.callee.computed || matcherCall.callee.property.type !== import_utils110.AST_NODE_TYPES.Identifier || matcherCall.arguments.length !== 1) return null;
19870
- const matcher = matcherCall.callee.property.name;
19868
+ if (matcherCall.callee.type !== import_utils110.AST_NODE_TYPES.MemberExpression || import_utils110.ASTUtils.getPropertyName(matcherCall.callee) === null || matcherCall.arguments.length !== 1) return null;
19869
+ const matcher = import_utils110.ASTUtils.getPropertyName(matcherCall.callee) ?? "";
19871
19870
  if (SNAPSHOT_MATCHERS.test(matcher)) return null;
19872
19871
  const chain = expectCallFromMatcher(matcherCall.callee);
19873
19872
  if (chain === null || chain.call.callee.type !== import_utils110.AST_NODE_TYPES.Identifier || importedName7(chain.call.callee, context, ASSERTION_MODULES3) !== "expect" || chain.call.arguments.length !== 1) return null;
@@ -20279,7 +20278,7 @@ function twinCallChain(node, zodNamespaces) {
20279
20278
  let current = node;
20280
20279
  while (current.type === import_utils111.AST_NODE_TYPES.CallExpression) {
20281
20280
  const callee = current.callee;
20282
- if (callee.type !== import_utils111.AST_NODE_TYPES.MemberExpression || callee.computed || callee.property.type !== import_utils111.AST_NODE_TYPES.Identifier) {
20281
+ if (callee.type !== import_utils111.AST_NODE_TYPES.MemberExpression || import_utils111.ASTUtils.getPropertyName(callee) === null) {
20283
20282
  return null;
20284
20283
  }
20285
20284
  chain.push(current);
@@ -20292,7 +20291,7 @@ function twinCallChain(node, zodNamespaces) {
20292
20291
  }
20293
20292
  function twinMethodName(call) {
20294
20293
  const callee = call.callee;
20295
- return callee.type === import_utils111.AST_NODE_TYPES.MemberExpression && callee.property.type === import_utils111.AST_NODE_TYPES.Identifier ? callee.property.name : "";
20294
+ return callee.type === import_utils111.AST_NODE_TYPES.MemberExpression && import_utils111.ASTUtils.getPropertyName(callee) !== null ? import_utils111.ASTUtils.getPropertyName(callee) ?? "" : "";
20296
20295
  }
20297
20296
  function twinSchemaFields(initializer, zodNamespaces) {
20298
20297
  const chain = twinCallChain(initializer, zodNamespaces);
@@ -20321,16 +20320,16 @@ function twinSchemaField(node, zodNamespaces) {
20321
20320
  let leafCall = null;
20322
20321
  while (current.type === import_utils111.AST_NODE_TYPES.CallExpression) {
20323
20322
  const callee = current.callee;
20324
- if (callee.type !== import_utils111.AST_NODE_TYPES.MemberExpression || callee.computed || callee.property.type !== import_utils111.AST_NODE_TYPES.Identifier) {
20323
+ if (callee.type !== import_utils111.AST_NODE_TYPES.MemberExpression || import_utils111.ASTUtils.getPropertyName(callee) === null) {
20325
20324
  break;
20326
20325
  }
20327
20326
  const receiver = callee.object;
20328
20327
  if (receiver.type === import_utils111.AST_NODE_TYPES.Identifier && zodNamespaces.has(receiver.name)) {
20329
- leaf = callee.property.name;
20328
+ leaf = import_utils111.ASTUtils.getPropertyName(callee) ?? "";
20330
20329
  leafCall = current;
20331
20330
  break;
20332
20331
  }
20333
- modifiers.push(callee.property.name);
20332
+ modifiers.push(import_utils111.ASTUtils.getPropertyName(callee) ?? "");
20334
20333
  current = receiver;
20335
20334
  }
20336
20335
  return {
@@ -20532,8 +20531,8 @@ var prefer_zod_infer_default = createRule({
20532
20531
  }
20533
20532
  },
20534
20533
  /** Records `XSchema.transform(...)` and equivalent module-level reshaping. */
20535
- "MemberExpression[computed=false]"(node) {
20536
- if (node.object.type === import_utils111.AST_NODE_TYPES.Identifier && node.property.type === import_utils111.AST_NODE_TYPES.Identifier && isPreferZodInferModuleReshaper(node.property.name)) {
20534
+ "MemberExpression"(node) {
20535
+ if (node.object.type === import_utils111.AST_NODE_TYPES.Identifier && import_utils111.ASTUtils.getPropertyName(node) !== null && isPreferZodInferModuleReshaper(import_utils111.ASTUtils.getPropertyName(node) ?? "")) {
20537
20536
  reshapedSchemaNames.add(node.object.name);
20538
20537
  }
20539
20538
  },
@@ -20754,11 +20753,11 @@ function isLocalZodObjectSchema(node, namespaces) {
20754
20753
  let current = node;
20755
20754
  while (current.type === import_utils112.AST_NODE_TYPES.CallExpression) {
20756
20755
  const { callee } = current;
20757
- if (callee.type !== import_utils112.AST_NODE_TYPES.MemberExpression || callee.computed || callee.property.type !== import_utils112.AST_NODE_TYPES.Identifier) {
20756
+ if (callee.type !== import_utils112.AST_NODE_TYPES.MemberExpression || import_utils112.ASTUtils.getPropertyName(callee) === null) {
20758
20757
  return false;
20759
20758
  }
20760
20759
  if (callee.object.type === import_utils112.AST_NODE_TYPES.Identifier) {
20761
- return namespaces.has(callee.object.name) && (callee.property.name === "object" || callee.property.name === "strictObject");
20760
+ return namespaces.has(callee.object.name) && ((import_utils112.ASTUtils.getPropertyName(callee) ?? "") === "object" || (import_utils112.ASTUtils.getPropertyName(callee) ?? "") === "strictObject");
20762
20761
  }
20763
20762
  current = callee.object;
20764
20763
  }
@@ -20766,12 +20765,14 @@ function isLocalZodObjectSchema(node, namespaces) {
20766
20765
  }
20767
20766
  function zodParseCall(node) {
20768
20767
  const { callee } = node;
20769
- if (callee.type !== import_utils112.AST_NODE_TYPES.MemberExpression || callee.computed || callee.object.type !== import_utils112.AST_NODE_TYPES.Identifier || callee.property.type !== import_utils112.AST_NODE_TYPES.Identifier || callee.property.name !== "parse" && callee.property.name !== "safeParse") {
20768
+ if (callee.type !== import_utils112.AST_NODE_TYPES.MemberExpression || callee.object.type !== import_utils112.AST_NODE_TYPES.Identifier || import_utils112.ASTUtils.getPropertyName(callee) === null) {
20770
20769
  return null;
20771
20770
  }
20771
+ const method = import_utils112.ASTUtils.getPropertyName(callee);
20772
+ if (method !== "parse" && method !== "safeParse") return null;
20772
20773
  return {
20773
20774
  call: node,
20774
- method: callee.property.name,
20775
+ method,
20775
20776
  schema: callee.object
20776
20777
  };
20777
20778
  }
@@ -20809,7 +20810,7 @@ function localParseReturnCandidates(node, sourceCode) {
20809
20810
  for (const reference of variable.references) {
20810
20811
  const identifier = reference.identifier;
20811
20812
  const parent = identifier.parent;
20812
- const output = parsed.method === "parse" ? identifier : parent.type === import_utils112.AST_NODE_TYPES.MemberExpression && parent.object === identifier && !parent.computed && parent.property.type === import_utils112.AST_NODE_TYPES.Identifier && parent.property.name === "data" ? parent : null;
20813
+ const output = parsed.method === "parse" ? identifier : parent.type === import_utils112.AST_NODE_TYPES.MemberExpression && parent.object === identifier && import_utils112.ASTUtils.getPropertyName(parent) !== null && (import_utils112.ASTUtils.getPropertyName(parent) ?? "") === "data" ? parent : null;
20813
20814
  if (output === null) continue;
20814
20815
  const candidate2 = returnedOutputCandidate(parsed, output);
20815
20816
  if (candidate2 !== null) candidates.push(candidate2);
@@ -21042,7 +21043,7 @@ var prefer_zod_parse_output_type_default = createRule({
21042
21043
  const candidate2 = directParseReturnCandidate(node);
21043
21044
  if (candidate2 !== null) candidates.push(candidate2);
21044
21045
  },
21045
- "MemberExpression[computed=false]"(node) {
21046
+ "MemberExpression"(node) {
21046
21047
  if (node.object.type === import_utils112.AST_NODE_TYPES.Identifier && node.property.type === import_utils112.AST_NODE_TYPES.Identifier && isPreferZodInferModuleReshaper(node.property.name)) {
21047
21048
  reshapedSchemas.add(node.object.name);
21048
21049
  }
@@ -21966,7 +21967,7 @@ var require_use_form_default_values_default = createRule({
21966
21967
  const variable = bindingOf(node);
21967
21968
  return variable !== null && stable(variable) && uninitializedControls.has(variable);
21968
21969
  }
21969
- return node.type === import_utils118.AST_NODE_TYPES.MemberExpression && !node.computed && node.property.type === import_utils118.AST_NODE_TYPES.Identifier && node.property.name === "control" && isUninitializedForm(node.object);
21970
+ return node.type === import_utils118.AST_NODE_TYPES.MemberExpression && import_utils118.ASTUtils.getPropertyName(node) !== null && (import_utils118.ASTUtils.getPropertyName(node) ?? "") === "control" && isUninitializedForm(node.object);
21970
21971
  };
21971
21972
  const fieldOptionsNeedDefault = (node) => {
21972
21973
  if (node?.type !== import_utils118.AST_NODE_TYPES.ObjectExpression) return false;
@@ -22022,7 +22023,7 @@ var require_use_form_default_values_default = createRule({
22022
22023
  trackDestructuredControl(node.id);
22023
22024
  return;
22024
22025
  }
22025
- if (node.id.type === import_utils118.AST_NODE_TYPES.Identifier && node.init.type === import_utils118.AST_NODE_TYPES.MemberExpression && !node.init.computed && node.init.property.type === import_utils118.AST_NODE_TYPES.Identifier && node.init.property.name === "control" && isUninitializedForm(node.init.object)) {
22026
+ if (node.id.type === import_utils118.AST_NODE_TYPES.Identifier && node.init.type === import_utils118.AST_NODE_TYPES.MemberExpression && import_utils118.ASTUtils.getPropertyName(node.init) !== null && (import_utils118.ASTUtils.getPropertyName(node.init) ?? "") === "control" && isUninitializedForm(node.init.object)) {
22026
22027
  const variable = bindingOf(node.id);
22027
22028
  if (variable !== null) uninitializedControls.add(variable);
22028
22029
  }
@@ -22159,7 +22160,7 @@ var isFormDataMethodCall = (node) => {
22159
22160
  }
22160
22161
  if (current.type !== import_utils120.AST_NODE_TYPES.CallExpression) return false;
22161
22162
  const callee = current.callee;
22162
- return callee.type === import_utils120.AST_NODE_TYPES.MemberExpression && !callee.computed && callee.property.type === import_utils120.AST_NODE_TYPES.Identifier && callee.property.name === "formData";
22163
+ return callee.type === import_utils120.AST_NODE_TYPES.MemberExpression && import_utils120.ASTUtils.getPropertyName(callee) !== null && (import_utils120.ASTUtils.getPropertyName(callee) ?? "") === "formData";
22163
22164
  };
22164
22165
  var require_zod_form_validation_default = createRule({
22165
22166
  name: "require-zod-form-validation",
@@ -22187,7 +22188,7 @@ var require_zod_form_validation_default = createRule({
22187
22188
  const isFormDataGetCall = (node) => {
22188
22189
  const callee = node.callee;
22189
22190
  if (callee.type !== import_utils120.AST_NODE_TYPES.MemberExpression) return false;
22190
- if (callee.property.type !== import_utils120.AST_NODE_TYPES.Identifier || !FORM_VALUE_METHODS.has(callee.property.name)) {
22191
+ if (import_utils120.ASTUtils.getPropertyName(callee) === null || !FORM_VALUE_METHODS.has(import_utils120.ASTUtils.getPropertyName(callee) ?? "")) {
22191
22192
  return false;
22192
22193
  }
22193
22194
  return isFormSourceIdentifier(callee.object);
@@ -22217,7 +22218,7 @@ var require_zod_form_validation_default = createRule({
22217
22218
  parent = parent.parent;
22218
22219
  continue;
22219
22220
  }
22220
- if (parent.type === import_utils120.AST_NODE_TYPES.CallExpression && parent.callee.type === import_utils120.AST_NODE_TYPES.MemberExpression && !parent.callee.computed && parent.callee.object.type === import_utils120.AST_NODE_TYPES.Identifier && parent.callee.object.name === "Object" && parent.callee.property.type === import_utils120.AST_NODE_TYPES.Identifier && parent.callee.property.name === "fromEntries" && (resolvedBinding(parent.callee.object)?.defs.length ?? 0) === 0) {
22221
+ if (parent.type === import_utils120.AST_NODE_TYPES.CallExpression && parent.callee.type === import_utils120.AST_NODE_TYPES.MemberExpression && parent.callee.object.type === import_utils120.AST_NODE_TYPES.Identifier && parent.callee.object.name === "Object" && import_utils120.ASTUtils.getPropertyName(parent.callee) !== null && (import_utils120.ASTUtils.getPropertyName(parent.callee) ?? "") === "fromEntries" && (resolvedBinding(parent.callee.object)?.defs.length ?? 0) === 0) {
22221
22222
  parent = parent.parent;
22222
22223
  continue;
22223
22224
  }
@@ -22229,7 +22230,7 @@ var require_zod_form_validation_default = createRule({
22229
22230
  const isZodParseCall = (node) => {
22230
22231
  if (node.type !== import_utils120.AST_NODE_TYPES.CallExpression) return false;
22231
22232
  const callee = node.callee;
22232
- if (callee.type !== import_utils120.AST_NODE_TYPES.MemberExpression || callee.computed || callee.property.type !== import_utils120.AST_NODE_TYPES.Identifier || !ZOD_PARSE_METHODS.has(callee.property.name)) {
22233
+ if (callee.type !== import_utils120.AST_NODE_TYPES.MemberExpression || import_utils120.ASTUtils.getPropertyName(callee) === null || !ZOD_PARSE_METHODS.has(import_utils120.ASTUtils.getPropertyName(callee) ?? "")) {
22233
22234
  return false;
22234
22235
  }
22235
22236
  const root = zodReceiverRoot(callee.object);
@@ -22315,7 +22316,7 @@ var require_zod_form_validation_default = createRule({
22315
22316
  };
22316
22317
  const zodParseMethod = (call) => {
22317
22318
  const callee = call.callee;
22318
- return callee.type === import_utils120.AST_NODE_TYPES.MemberExpression && !callee.computed && callee.property.type === import_utils120.AST_NODE_TYPES.Identifier ? callee.property.name : null;
22319
+ return callee.type === import_utils120.AST_NODE_TYPES.MemberExpression && import_utils120.ASTUtils.getPropertyName(callee) !== null ? import_utils120.ASTUtils.getPropertyName(callee) ?? "" : null;
22319
22320
  };
22320
22321
  const isSafePrevalidationInspection = (identifier) => {
22321
22322
  const parent = identifier.parent;
@@ -23684,7 +23685,7 @@ var SCHEMA_RETURNING_METHODS = /* @__PURE__ */ new Set([
23684
23685
  "superRefine",
23685
23686
  "transform"
23686
23687
  ]);
23687
- var terminalMethodName = (callee) => !callee.computed && callee.property.type === import_utils125.AST_NODE_TYPES.Identifier ? callee.property.name : null;
23688
+ var terminalMethodName = (callee) => import_utils125.ASTUtils.getPropertyName(callee) !== null ? import_utils125.ASTUtils.getPropertyName(callee) ?? "" : null;
23688
23689
  var calleeChainRoot2 = (node) => {
23689
23690
  let current = node;
23690
23691
  for (; ; ) {
@@ -23707,8 +23708,8 @@ var chainMemberNames2 = (node) => {
23707
23708
  let current = node;
23708
23709
  for (; ; ) {
23709
23710
  if (current.type === import_utils125.AST_NODE_TYPES.MemberExpression) {
23710
- if (current.computed || current.property.type !== import_utils125.AST_NODE_TYPES.Identifier) return [];
23711
- names.push(current.property.name);
23711
+ if (import_utils125.ASTUtils.getPropertyName(current) === null) return [];
23712
+ names.push(import_utils125.ASTUtils.getPropertyName(current) ?? "");
23712
23713
  current = current.object;
23713
23714
  continue;
23714
23715
  }
@@ -24020,7 +24021,7 @@ var RULES = {
24020
24021
  };
24021
24022
  var meta = {
24022
24023
  name: "@sarj/eslint-plugin",
24023
- version: "16.3.0"
24024
+ version: "16.3.1"
24024
24025
  };
24025
24026
  var APPLICATION_ONLY_RULES = [];
24026
24027
  var LIBRARY_IMPORT_POLICY = ["error", {