@eslint-react/var 1.53.0 → 1.53.1-beta.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.js CHANGED
@@ -21,11 +21,16 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
21
21
  }) : target, mod));
22
22
 
23
23
  //#endregion
24
- const __eslint_react_eff = __toESM(require("@eslint-react/eff"));
25
- const __typescript_eslint_scope_manager = __toESM(require("@typescript-eslint/scope-manager"));
26
- const __typescript_eslint_types = __toESM(require("@typescript-eslint/types"));
27
- const __typescript_eslint_utils_ast_utils = __toESM(require("@typescript-eslint/utils/ast-utils"));
28
- const __eslint_react_ast = __toESM(require("@eslint-react/ast"));
24
+ let __eslint_react_eff = require("@eslint-react/eff");
25
+ __eslint_react_eff = __toESM(__eslint_react_eff);
26
+ let __typescript_eslint_scope_manager = require("@typescript-eslint/scope-manager");
27
+ __typescript_eslint_scope_manager = __toESM(__typescript_eslint_scope_manager);
28
+ let __typescript_eslint_types = require("@typescript-eslint/types");
29
+ __typescript_eslint_types = __toESM(__typescript_eslint_types);
30
+ let __typescript_eslint_utils_ast_utils = require("@typescript-eslint/utils/ast-utils");
31
+ __typescript_eslint_utils_ast_utils = __toESM(__typescript_eslint_utils_ast_utils);
32
+ let __eslint_react_ast = require("@eslint-react/ast");
33
+ __eslint_react_ast = __toESM(__eslint_react_ast);
29
34
 
30
35
  //#region src/var-init-node.ts
31
36
  function getVariableInitNode(variable, at) {
@@ -136,16 +141,12 @@ function getConstruction(node, initialScope, hint = ConstructionDetectionHint.No
136
141
  case __typescript_eslint_types.AST_NODE_TYPES.AssignmentPattern:
137
142
  if (!("right" in node)) return __eslint_react_eff.unit;
138
143
  return getConstruction(node.right, initialScope, hint);
139
- case __typescript_eslint_types.AST_NODE_TYPES.LogicalExpression: {
140
- const lvc = getConstruction(node.left, initialScope, hint);
141
- if (lvc == null) return __eslint_react_eff.unit;
144
+ case __typescript_eslint_types.AST_NODE_TYPES.LogicalExpression:
145
+ if (getConstruction(node.left, initialScope, hint) == null) return __eslint_react_eff.unit;
142
146
  return getConstruction(node.right, initialScope, hint);
143
- }
144
- case __typescript_eslint_types.AST_NODE_TYPES.ConditionalExpression: {
145
- const cvc = getConstruction(node.consequent, initialScope, hint);
146
- if (cvc == null) return __eslint_react_eff.unit;
147
+ case __typescript_eslint_types.AST_NODE_TYPES.ConditionalExpression:
148
+ if (getConstruction(node.consequent, initialScope, hint) == null) return __eslint_react_eff.unit;
147
149
  return getConstruction(node.alternate, initialScope, hint);
148
- }
149
150
  case __typescript_eslint_types.AST_NODE_TYPES.Identifier: {
150
151
  if (!("name" in node) || typeof node.name !== "string") return __eslint_react_eff.unit;
151
152
  const variable = initialScope.set.get(node.name);
package/dist/index.mjs CHANGED
@@ -114,16 +114,12 @@ function getConstruction(node, initialScope, hint = ConstructionDetectionHint.No
114
114
  case AST_NODE_TYPES.AssignmentPattern:
115
115
  if (!("right" in node)) return unit;
116
116
  return getConstruction(node.right, initialScope, hint);
117
- case AST_NODE_TYPES.LogicalExpression: {
118
- const lvc = getConstruction(node.left, initialScope, hint);
119
- if (lvc == null) return unit;
117
+ case AST_NODE_TYPES.LogicalExpression:
118
+ if (getConstruction(node.left, initialScope, hint) == null) return unit;
120
119
  return getConstruction(node.right, initialScope, hint);
121
- }
122
- case AST_NODE_TYPES.ConditionalExpression: {
123
- const cvc = getConstruction(node.consequent, initialScope, hint);
124
- if (cvc == null) return unit;
120
+ case AST_NODE_TYPES.ConditionalExpression:
121
+ if (getConstruction(node.consequent, initialScope, hint) == null) return unit;
125
122
  return getConstruction(node.alternate, initialScope, hint);
126
- }
127
123
  case AST_NODE_TYPES.Identifier: {
128
124
  if (!("name" in node) || typeof node.name !== "string") return unit;
129
125
  const variable = initialScope.set.get(node.name);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/var",
3
- "version": "1.53.0",
3
+ "version": "1.53.1-beta.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": {
@@ -35,16 +35,16 @@
35
35
  "./package.json"
36
36
  ],
37
37
  "dependencies": {
38
- "@typescript-eslint/scope-manager": "^8.42.0",
39
- "@typescript-eslint/types": "^8.42.0",
40
- "@typescript-eslint/utils": "^8.42.0",
38
+ "@typescript-eslint/scope-manager": "^8.43.0",
39
+ "@typescript-eslint/types": "^8.43.0",
40
+ "@typescript-eslint/utils": "^8.43.0",
41
41
  "string-ts": "^2.2.1",
42
42
  "ts-pattern": "^5.8.0",
43
- "@eslint-react/eff": "1.53.0",
44
- "@eslint-react/ast": "1.53.0"
43
+ "@eslint-react/ast": "1.53.1-beta.1",
44
+ "@eslint-react/eff": "1.53.1-beta.1"
45
45
  },
46
46
  "devDependencies": {
47
- "tsdown": "^0.14.2",
47
+ "tsdown": "^0.15.0",
48
48
  "@local/configs": "0.0.0"
49
49
  },
50
50
  "engines": {