@eslint-react/core 1.23.3-next.6 → 1.23.3-next.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.
package/dist/index.js CHANGED
@@ -690,14 +690,10 @@ var ERPhaseRelevance = types.birecord({
690
690
  });
691
691
  var isInversePhase = eff.F.dual(2, (a, b) => ERPhaseRelevance.get(a) === b);
692
692
  function isDirectValueOfRenderPropertyLoose(node) {
693
- const matching = tsPattern.isMatching({
694
- key: {
695
- type: types$1.AST_NODE_TYPES.Identifier,
696
- name: tsPattern.P.string.startsWith("render")
697
- },
698
- type: types$1.AST_NODE_TYPES.Property
699
- });
700
- return matching(node) || matching(node.parent);
693
+ const matching = (node2) => {
694
+ return node2.type === types$1.AST_NODE_TYPES.Property && node2.key.type === types$1.AST_NODE_TYPES.Identifier && node2.key.name.startsWith("render");
695
+ };
696
+ return matching(node) || node.parent != null && matching(node.parent);
701
697
  }
702
698
  function isDeclaredInRenderPropLoose(node) {
703
699
  if (isDirectValueOfRenderPropertyLoose(node)) {
@@ -708,10 +704,9 @@ function isDeclaredInRenderPropLoose(node) {
708
704
  eff.O.flatMapNullable((c) => c.parent),
709
705
  eff.O.filter(AST8__namespace.is(types$1.AST_NODE_TYPES.JSXAttribute)),
710
706
  eff.O.flatMapNullable((a) => a.name),
711
- eff.O.exists(tsPattern.isMatching({
712
- type: types$1.AST_NODE_TYPES.JSXIdentifier,
713
- name: tsPattern.P.string.startsWith("render")
714
- }))
707
+ eff.O.exists(
708
+ (n) => n.type === types$1.AST_NODE_TYPES.JSXIdentifier && n.name.startsWith("render")
709
+ )
715
710
  );
716
711
  }
717
712
  function isRenderFunctionLoose(node, context) {
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import * as AST8 from '@eslint-react/ast';
2
2
  import { F, isString, O } from '@eslint-react/eff';
3
3
  import * as JSX4 from '@eslint-react/jsx';
4
4
  import { AST_NODE_TYPES } from '@typescript-eslint/types';
5
- import { isMatching, P, match } from 'ts-pattern';
5
+ import { match } from 'ts-pattern';
6
6
  import { getSettingsFromContext, unsafeDecodeSettings } from '@eslint-react/shared';
7
7
  import * as VAR from '@eslint-react/var';
8
8
  import { birecord } from '@eslint-react/types';
@@ -666,14 +666,10 @@ var ERPhaseRelevance = birecord({
666
666
  });
667
667
  var isInversePhase = F.dual(2, (a, b) => ERPhaseRelevance.get(a) === b);
668
668
  function isDirectValueOfRenderPropertyLoose(node) {
669
- const matching = isMatching({
670
- key: {
671
- type: AST_NODE_TYPES.Identifier,
672
- name: P.string.startsWith("render")
673
- },
674
- type: AST_NODE_TYPES.Property
675
- });
676
- return matching(node) || matching(node.parent);
669
+ const matching = (node2) => {
670
+ return node2.type === AST_NODE_TYPES.Property && node2.key.type === AST_NODE_TYPES.Identifier && node2.key.name.startsWith("render");
671
+ };
672
+ return matching(node) || node.parent != null && matching(node.parent);
677
673
  }
678
674
  function isDeclaredInRenderPropLoose(node) {
679
675
  if (isDirectValueOfRenderPropertyLoose(node)) {
@@ -684,10 +680,9 @@ function isDeclaredInRenderPropLoose(node) {
684
680
  O.flatMapNullable((c) => c.parent),
685
681
  O.filter(AST8.is(AST_NODE_TYPES.JSXAttribute)),
686
682
  O.flatMapNullable((a) => a.name),
687
- O.exists(isMatching({
688
- type: AST_NODE_TYPES.JSXIdentifier,
689
- name: P.string.startsWith("render")
690
- }))
683
+ O.exists(
684
+ (n) => n.type === AST_NODE_TYPES.JSXIdentifier && n.name.startsWith("render")
685
+ )
691
686
  );
692
687
  }
693
688
  function isRenderFunctionLoose(node, context) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/core",
3
- "version": "1.23.3-next.6",
3
+ "version": "1.23.3-next.7",
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": {
@@ -38,12 +38,12 @@
38
38
  "@typescript-eslint/types": "^8.19.1",
39
39
  "@typescript-eslint/utils": "^8.19.1",
40
40
  "ts-pattern": "^5.6.0",
41
- "@eslint-react/ast": "1.23.3-next.6",
42
- "@eslint-react/eff": "1.23.3-next.6",
43
- "@eslint-react/jsx": "1.23.3-next.6",
44
- "@eslint-react/shared": "1.23.3-next.6",
45
- "@eslint-react/var": "1.23.3-next.6",
46
- "@eslint-react/types": "1.23.3-next.6"
41
+ "@eslint-react/eff": "1.23.3-next.7",
42
+ "@eslint-react/ast": "1.23.3-next.7",
43
+ "@eslint-react/jsx": "1.23.3-next.7",
44
+ "@eslint-react/types": "1.23.3-next.7",
45
+ "@eslint-react/shared": "1.23.3-next.7",
46
+ "@eslint-react/var": "1.23.3-next.7"
47
47
  },
48
48
  "devDependencies": {
49
49
  "tsup": "^8.3.5",