@eslint-react/var 5.20.8 → 5.21.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.
Files changed (2) hide show
  1. package/dist/index.js +4 -1
  2. package/package.json +14 -9
package/dist/index.js CHANGED
@@ -732,7 +732,10 @@ function isValueEqual(context, a, b) {
732
732
  * @internal
733
733
  */
734
734
  function isAssignmentTargetEqual(context, a, b) {
735
- return Compare.isEqual(a, b) || isValueEqual(context, a, b);
735
+ const unwrappedA = Check.isTypeExpression(a) ? Extract.unwrap(a) : a;
736
+ const unwrappedB = Check.isTypeExpression(b) ? Extract.unwrap(b) : b;
737
+ if (Check.isIdentifier(unwrappedA) && Check.isIdentifier(unwrappedB)) return isValueEqual(context, unwrappedA, unwrappedB);
738
+ return Compare.isEqual(unwrappedA, unwrappedB) || isValueEqual(context, unwrappedA, unwrappedB);
736
739
  }
737
740
 
738
741
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/var",
3
- "version": "5.20.8",
3
+ "version": "5.21.1",
4
4
  "description": "ESLint React's TSESTree AST utility module for static analysis of variables.",
5
5
  "homepage": "https://github.com/Rel1cx/eslint-react",
6
6
  "bugs": {
@@ -29,28 +29,33 @@
29
29
  "dist"
30
30
  ],
31
31
  "dependencies": {
32
- "@eslint-react/ast": "5.20.8",
33
- "@eslint-react/eslint": "5.20.8",
34
- "@typescript-eslint/scope-manager": "^8.70.0",
35
- "@typescript-eslint/types": "^8.70.0",
36
- "@typescript-eslint/utils": "^8.70.0",
32
+ "@eslint-react/ast": "5.21.1",
33
+ "@eslint-react/eslint": "5.21.1",
34
+ "@typescript-eslint/scope-manager": "^8.70.1",
35
+ "@typescript-eslint/types": "^8.70.1",
36
+ "@typescript-eslint/utils": "^8.70.1",
37
37
  "ts-pattern": "^5.9.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@local/configs": "0.0.0",
41
41
  "@local/eff": "0.0.0",
42
42
  "@local/testkit": "0.0.0",
43
- "@typescript-eslint/parser": "^8.70.0",
44
- "@typescript-eslint/typescript-estree": "^8.70.0",
43
+ "@typescript-eslint/parser": "^8.70.1",
44
+ "@typescript-eslint/typescript-estree": "^8.70.1",
45
45
  "eslint": "^10.11.0",
46
46
  "tsdown": "^0.23.0",
47
47
  "typescript": "6.0.3",
48
- "vitest": "^5.0.1"
48
+ "vitest": "^5.0.2"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "eslint": "*",
52
52
  "typescript": "*"
53
53
  },
54
+ "peerDependenciesMeta": {
55
+ "eslint": {
56
+ "optional": true
57
+ }
58
+ },
54
59
  "engines": {
55
60
  "node": ">=22.0.0"
56
61
  },