@eslint-react/var 1.22.1-next.1 → 1.22.1-next.2

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
@@ -201,7 +201,7 @@ function isInitializedFromSource(name, source, initialScope) {
201
201
  return isInitializedFromSource(init.name, source, initialScope);
202
202
  }
203
203
  return eff.F.pipe(
204
- getRequireExpressionArgument(init),
204
+ getRequireExpressionArguments(init),
205
205
  eff.O.flatMapNullable((args) => args[0]),
206
206
  eff.O.filter(AST__namespace.isStringLiteral),
207
207
  // check for: `require('source')` or `require('source/...')`
@@ -210,7 +210,7 @@ function isInitializedFromSource(name, source, initialScope) {
210
210
  }
211
211
  return tsPattern.isMatching({ type: "ImportDeclaration", source: { value: source } }, parent);
212
212
  }
213
- function getRequireExpressionArgument(node) {
213
+ function getRequireExpressionArguments(node) {
214
214
  switch (true) {
215
215
  // require('source')
216
216
  case (node.type === types.AST_NODE_TYPES.CallExpression && node.callee.type === types.AST_NODE_TYPES.Identifier && node.callee.name === "require"): {
@@ -218,7 +218,7 @@ function getRequireExpressionArgument(node) {
218
218
  }
219
219
  // require('source').variable
220
220
  case node.type === types.AST_NODE_TYPES.MemberExpression: {
221
- return getRequireExpressionArgument(node.object);
221
+ return getRequireExpressionArguments(node.object);
222
222
  }
223
223
  }
224
224
  return eff.O.none();
package/dist/index.mjs CHANGED
@@ -178,7 +178,7 @@ function isInitializedFromSource(name, source, initialScope) {
178
178
  return isInitializedFromSource(init.name, source, initialScope);
179
179
  }
180
180
  return F.pipe(
181
- getRequireExpressionArgument(init),
181
+ getRequireExpressionArguments(init),
182
182
  O.flatMapNullable((args) => args[0]),
183
183
  O.filter(AST.isStringLiteral),
184
184
  // check for: `require('source')` or `require('source/...')`
@@ -187,7 +187,7 @@ function isInitializedFromSource(name, source, initialScope) {
187
187
  }
188
188
  return isMatching({ type: "ImportDeclaration", source: { value: source } }, parent);
189
189
  }
190
- function getRequireExpressionArgument(node) {
190
+ function getRequireExpressionArguments(node) {
191
191
  switch (true) {
192
192
  // require('source')
193
193
  case (node.type === AST_NODE_TYPES.CallExpression && node.callee.type === AST_NODE_TYPES.Identifier && node.callee.name === "require"): {
@@ -195,7 +195,7 @@ function getRequireExpressionArgument(node) {
195
195
  }
196
196
  // require('source').variable
197
197
  case node.type === AST_NODE_TYPES.MemberExpression: {
198
- return getRequireExpressionArgument(node.object);
198
+ return getRequireExpressionArguments(node.object);
199
199
  }
200
200
  }
201
201
  return O.none();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/var",
3
- "version": "1.22.1-next.1",
3
+ "version": "1.22.1-next.2",
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": {
@@ -38,13 +38,13 @@
38
38
  "@typescript-eslint/scope-manager": "^8.18.1",
39
39
  "@typescript-eslint/types": "^8.18.1",
40
40
  "@typescript-eslint/utils": "^8.18.1",
41
+ "string-ts": "^2.2.0",
41
42
  "ts-pattern": "^5.6.0",
42
- "@eslint-react/ast": "1.22.1-next.1",
43
- "@eslint-react/types": "1.22.1-next.1",
44
- "@eslint-react/eff": "1.22.1-next.1"
43
+ "@eslint-react/ast": "1.22.1-next.2",
44
+ "@eslint-react/eff": "1.22.1-next.2",
45
+ "@eslint-react/types": "1.22.1-next.2"
45
46
  },
46
47
  "devDependencies": {
47
- "string-ts": "^2.2.0",
48
48
  "tsup": "^8.3.5",
49
49
  "@workspace/configs": "0.0.0"
50
50
  },