@eslint-react/jsx 5.24.0-beta.1 → 5.24.0-beta.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.
Files changed (2) hide show
  1. package/dist/index.js +4 -1
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -5,6 +5,9 @@ import { getStaticValue } from "@typescript-eslint/utils/ast-utils";
5
5
  import { P, match } from "ts-pattern";
6
6
 
7
7
  //#region ../../.pkgs/eff/dist/index.js
8
+ function or(a, b) {
9
+ return (data) => a(data) || b(data);
10
+ }
8
11
  /**
9
12
  * Applies a `pipe` method's variadic arguments to an initial value from left
10
13
  * to right.
@@ -853,7 +856,7 @@ function getChildren(element) {
853
856
  */
854
857
  function hasChildren(element) {
855
858
  if (element.children.length === 0) return false;
856
- return !element.children.every((child) => isWhitespaceText(child) || isEmptyStringExpression(child));
859
+ return !element.children.every(or(isWhitespaceText, isEmptyStringExpression));
857
860
  }
858
861
 
859
862
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/jsx",
3
- "version": "5.24.0-beta.1",
3
+ "version": "5.24.0-beta.2",
4
4
  "description": "ESLint React's TSESTree JSX utility module for static analysis of JSX patterns.",
5
5
  "homepage": "https://github.com/Rel1cx/eslint-react",
6
6
  "bugs": {
@@ -29,9 +29,9 @@
29
29
  "dist"
30
30
  ],
31
31
  "dependencies": {
32
- "@eslint-react/ast": "5.24.0-beta.1",
33
- "@eslint-react/eslint": "5.24.0-beta.1",
34
- "@eslint-react/var": "5.24.0-beta.1",
32
+ "@eslint-react/ast": "5.24.0-beta.2",
33
+ "@eslint-react/eslint": "5.24.0-beta.2",
34
+ "@eslint-react/var": "5.24.0-beta.2",
35
35
  "@typescript-eslint/types": "^8.71.0",
36
36
  "@typescript-eslint/utils": "^8.71.0",
37
37
  "ts-pattern": "^5.9.0"