@eslint-react/core 1.23.3-next.3 → 1.23.3-next.4

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
@@ -510,15 +510,15 @@ function useComponentCollector(context, hint = DEFAULT_COMPONENT_HINT) {
510
510
  functionEntries.push({ key, node, hookCalls: [], isComponent: false });
511
511
  };
512
512
  const onFunctionExit = () => {
513
- const { key, node, isComponent } = functionEntries.at(-1) ?? {};
514
- if (!key || !node || !isComponent) {
513
+ const entry = functionEntries.at(-1);
514
+ if (!entry?.isComponent) {
515
515
  return functionEntries.pop();
516
516
  }
517
- const shouldDrop = AST8__namespace.getNestedReturnStatements(node.body).slice().reverse().some((r) => {
518
- return context.sourceCode.getScope(r).block === node && r.argument !== null && !JSX4__namespace.isJSXValue(r.argument, jsxCtx, hint);
517
+ const shouldDrop = AST8__namespace.getNestedReturnStatements(entry.node.body).slice().reverse().some((r) => {
518
+ return context.sourceCode.getScope(r).block === entry.node && r.argument !== null && !JSX4__namespace.isJSXValue(r.argument, jsxCtx, hint);
519
519
  });
520
520
  if (shouldDrop) {
521
- components.delete(key);
521
+ components.delete(entry.key);
522
522
  }
523
523
  return functionEntries.pop();
524
524
  };
package/dist/index.mjs CHANGED
@@ -486,15 +486,15 @@ function useComponentCollector(context, hint = DEFAULT_COMPONENT_HINT) {
486
486
  functionEntries.push({ key, node, hookCalls: [], isComponent: false });
487
487
  };
488
488
  const onFunctionExit = () => {
489
- const { key, node, isComponent } = functionEntries.at(-1) ?? {};
490
- if (!key || !node || !isComponent) {
489
+ const entry = functionEntries.at(-1);
490
+ if (!entry?.isComponent) {
491
491
  return functionEntries.pop();
492
492
  }
493
- const shouldDrop = AST8.getNestedReturnStatements(node.body).slice().reverse().some((r) => {
494
- return context.sourceCode.getScope(r).block === node && r.argument !== null && !JSX4.isJSXValue(r.argument, jsxCtx, hint);
493
+ const shouldDrop = AST8.getNestedReturnStatements(entry.node.body).slice().reverse().some((r) => {
494
+ return context.sourceCode.getScope(r).block === entry.node && r.argument !== null && !JSX4.isJSXValue(r.argument, jsxCtx, hint);
495
495
  });
496
496
  if (shouldDrop) {
497
- components.delete(key);
497
+ components.delete(entry.key);
498
498
  }
499
499
  return functionEntries.pop();
500
500
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/core",
3
- "version": "1.23.3-next.3",
3
+ "version": "1.23.3-next.4",
4
4
  "description": "ESLint React's ESLint utility module for static analysis of React core APIs and Patterns.",
5
5
  "homepage": "https://github.com/rEl1cx/eslint-react",
6
6
  "bugs": {
@@ -13,7 +13,6 @@
13
13
  },
14
14
  "license": "MIT",
15
15
  "author": "Eva1ent<rel1cx@proton.me>",
16
- "sideEffects": false,
17
16
  "exports": {
18
17
  ".": {
19
18
  "import": {
@@ -28,7 +27,6 @@
28
27
  "./package.json": "./package.json"
29
28
  },
30
29
  "main": "dist/index.js",
31
- "module": "dist/index.mjs",
32
30
  "types": "dist/index.d.ts",
33
31
  "files": [
34
32
  "dist",
@@ -40,12 +38,12 @@
40
38
  "@typescript-eslint/types": "^8.19.1",
41
39
  "@typescript-eslint/utils": "^8.19.1",
42
40
  "ts-pattern": "^5.6.0",
43
- "@eslint-react/eff": "1.23.3-next.3",
44
- "@eslint-react/ast": "1.23.3-next.3",
45
- "@eslint-react/jsx": "1.23.3-next.3",
46
- "@eslint-react/shared": "1.23.3-next.3",
47
- "@eslint-react/types": "1.23.3-next.3",
48
- "@eslint-react/var": "1.23.3-next.3"
41
+ "@eslint-react/ast": "1.23.3-next.4",
42
+ "@eslint-react/eff": "1.23.3-next.4",
43
+ "@eslint-react/jsx": "1.23.3-next.4",
44
+ "@eslint-react/var": "1.23.3-next.4",
45
+ "@eslint-react/types": "1.23.3-next.4",
46
+ "@eslint-react/shared": "1.23.3-next.4"
49
47
  },
50
48
  "devDependencies": {
51
49
  "tsup": "^8.3.5",
@@ -55,6 +53,8 @@
55
53
  "bun": ">=1.0.15",
56
54
  "node": ">=18.18.0"
57
55
  },
56
+ "sideEffects": false,
57
+ "module": "dist/index.mjs",
58
58
  "scripts": {
59
59
  "build": "tsup",
60
60
  "build:docs": "typedoc",