@eslint-react/var 5.18.6 → 5.18.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.
Files changed (2) hide show
  1. package/dist/index.js +3 -3
  2. package/package.json +14 -14
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ function getRequireExpressionArguments(node) {
15
15
  const unwrapped = Extract.unwrap(node);
16
16
  if (unwrapped.type === AST_NODE_TYPES.CallExpression) {
17
17
  const callee = Extract.unwrap(unwrapped.callee);
18
- if (callee.type === AST_NODE_TYPES.Identifier && callee.name === "require") return unwrapped.arguments;
18
+ if (Check.isIdentifier(callee, "require")) return unwrapped.arguments;
19
19
  }
20
20
  if (unwrapped.type === AST_NODE_TYPES.MemberExpression) return getRequireExpressionArguments(unwrapped.object);
21
21
  return null;
@@ -104,7 +104,7 @@ function isValueEqual(context, a, b) {
104
104
  case a === b: return true;
105
105
  case a.type === AST_NODE_TYPES.Literal && b.type === AST_NODE_TYPES.Literal: return a.value === b.value;
106
106
  case a.type === AST_NODE_TYPES.TemplateElement && b.type === AST_NODE_TYPES.TemplateElement: return a.value.cooked === b.value.cooked;
107
- case a.type === AST_NODE_TYPES.Identifier && b.type === AST_NODE_TYPES.Identifier: {
107
+ case Check.isIdentifier(a) && Check.isIdentifier(b): {
108
108
  const aDefNode = resolve(context, a);
109
109
  const bDefNode = resolve(context, b);
110
110
  const aDefNodeParent = aDefNode?.parent;
@@ -325,7 +325,7 @@ function resolveObjectType(context, node) {
325
325
  node
326
326
  };
327
327
  }
328
- if (callee.type === AST_NODE_TYPES.MemberExpression && callee.object.type === AST_NODE_TYPES.Identifier) {
328
+ if (callee.type === AST_NODE_TYPES.MemberExpression && Check.isIdentifier(callee.object)) {
329
329
  const objName = callee.object.name;
330
330
  const methodName = Extract.getCalleeName(node);
331
331
  switch (objName) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/var",
3
- "version": "5.18.6",
3
+ "version": "5.18.7",
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,23 +29,23 @@
29
29
  "dist"
30
30
  ],
31
31
  "dependencies": {
32
- "@typescript-eslint/scope-manager": "^8.67.0",
33
- "@typescript-eslint/types": "^8.67.0",
34
- "@typescript-eslint/utils": "^8.67.0",
35
- "ts-pattern": "^5.9.0",
36
- "@eslint-react/ast": "5.18.6",
37
- "@eslint-react/eslint": "5.18.6"
32
+ "@eslint-react/ast": "5.18.7",
33
+ "@eslint-react/eslint": "5.18.7",
34
+ "@typescript-eslint/scope-manager": "^8.69.0",
35
+ "@typescript-eslint/types": "^8.69.0",
36
+ "@typescript-eslint/utils": "^8.69.0",
37
+ "ts-pattern": "^5.9.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@typescript-eslint/parser": "^8.67.0",
41
- "@typescript-eslint/typescript-estree": "^8.67.0",
42
- "eslint": "^10.8.1",
43
- "tsdown": "^0.22.14",
44
- "typescript": "6.0.3",
45
- "vitest": "^4.1.10",
46
40
  "@local/configs": "0.0.0",
41
+ "@local/eff": "0.0.0",
47
42
  "@local/testkit": "0.0.0",
48
- "@local/eff": "0.0.0"
43
+ "@typescript-eslint/parser": "^8.69.0",
44
+ "@typescript-eslint/typescript-estree": "^8.69.0",
45
+ "eslint": "^10.9.1",
46
+ "tsdown": "^0.22.14",
47
+ "typescript": "6.0.3",
48
+ "vitest": "^4.1.11"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "eslint": "*",