@typescript-eslint/eslint-plugin 8.59.1-alpha.5 → 8.59.1-alpha.7

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.
@@ -456,6 +456,14 @@ exports.default = (0, util_1.createRule)({
456
456
  const assignmentParent = parent.parent;
457
457
  return assignmentParent.type !== utils_1.AST_NODE_TYPES.ExpressionStatement;
458
458
  }
459
+ function isRightHandSideOfLogicalAssignment(node) {
460
+ const { parent } = node;
461
+ return (parent.type === utils_1.AST_NODE_TYPES.AssignmentExpression &&
462
+ parent.right === node &&
463
+ (parent.operator === '&&=' ||
464
+ parent.operator === '||=' ||
465
+ parent.operator === '??='));
466
+ }
459
467
  function isInGenericContext(node) {
460
468
  let seenFunction = false;
461
469
  for (let current = node.parent; current; current = current.parent) {
@@ -512,6 +520,7 @@ exports.default = (0, util_1.createRule)({
512
520
  isInDestructuringDeclaration(node) ||
513
521
  isPropertyInProblematicContext(node) ||
514
522
  isAssignmentInNonStatementContext(node) ||
523
+ isRightHandSideOfLogicalAssignment(node) ||
515
524
  isArgumentToOverloadedFunction(node)) {
516
525
  return true;
517
526
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typescript-eslint/eslint-plugin",
3
- "version": "8.59.1-alpha.5",
3
+ "version": "8.59.1-alpha.7",
4
4
  "description": "TypeScript plugin for ESLint",
5
5
  "files": [
6
6
  "dist",
@@ -52,10 +52,10 @@
52
52
  "ignore": "^7.0.5",
53
53
  "natural-compare": "^1.4.0",
54
54
  "ts-api-utils": "^2.5.0",
55
- "@typescript-eslint/utils": "8.59.1-alpha.5",
56
- "@typescript-eslint/type-utils": "8.59.1-alpha.5",
57
- "@typescript-eslint/visitor-keys": "8.59.1-alpha.5",
58
- "@typescript-eslint/scope-manager": "8.59.1-alpha.5"
55
+ "@typescript-eslint/type-utils": "8.59.1-alpha.7",
56
+ "@typescript-eslint/scope-manager": "8.59.1-alpha.7",
57
+ "@typescript-eslint/visitor-keys": "8.59.1-alpha.7",
58
+ "@typescript-eslint/utils": "8.59.1-alpha.7"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@types/json-schema": "^7.0.15",
@@ -78,13 +78,13 @@
78
78
  "typescript": ">=4.8.4 <6.1.0",
79
79
  "unist-util-visit": "^5.0.0",
80
80
  "vitest": "^4.0.18",
81
- "@typescript-eslint/rule-schema-to-typescript-types": "8.59.1-alpha.5",
82
- "@typescript-eslint/rule-tester": "8.59.1-alpha.5"
81
+ "@typescript-eslint/rule-schema-to-typescript-types": "8.59.1-alpha.7",
82
+ "@typescript-eslint/rule-tester": "8.59.1-alpha.7"
83
83
  },
84
84
  "peerDependencies": {
85
85
  "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
86
86
  "typescript": ">=4.8.4 <6.1.0",
87
- "@typescript-eslint/parser": "^8.59.1-alpha.5"
87
+ "@typescript-eslint/parser": "^8.59.1-alpha.7"
88
88
  },
89
89
  "funding": {
90
90
  "type": "opencollective",