@eslint-react/core 1.48.2-next.0 → 1.48.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
@@ -1036,7 +1036,7 @@ function isReactHookName(name) {
1036
1036
  // src/hook/hook-is.ts
1037
1037
  function isReactHook(node) {
1038
1038
  if (node == null) return false;
1039
- const id = AST9__namespace.getFunctionIdentifier(node);
1039
+ const id = AST9__namespace.getFunctionId(node);
1040
1040
  return id?.name != null && isReactHookName(id.name);
1041
1041
  }
1042
1042
  function isReactHookCall(node) {
@@ -1139,7 +1139,7 @@ function useHookCollector() {
1139
1139
  const hooks = /* @__PURE__ */ new Map();
1140
1140
  const functionEntries = [];
1141
1141
  const onFunctionEnter = (node) => {
1142
- const id = AST9__namespace.getFunctionIdentifier(node);
1142
+ const id = AST9__namespace.getFunctionId(node);
1143
1143
  const key = shared.getId();
1144
1144
  const name = id?.name;
1145
1145
  if (name != null && isReactHookName(name)) {
@@ -1632,7 +1632,7 @@ function isComponentWrapperCallLoose(context, node) {
1632
1632
 
1633
1633
  // src/component/component-id.ts
1634
1634
  function getFunctionComponentId(context, node) {
1635
- const functionId = AST9__namespace.getFunctionIdentifier(node);
1635
+ const functionId = AST9__namespace.getFunctionId(node);
1636
1636
  if (functionId != null) {
1637
1637
  return functionId;
1638
1638
  }
@@ -1801,7 +1801,7 @@ function useComponentCollectorLegacy() {
1801
1801
  if (!isClassComponent(node)) {
1802
1802
  return;
1803
1803
  }
1804
- const id = AST9__namespace.getClassIdentifier(node);
1804
+ const id = AST9__namespace.getClassId(node);
1805
1805
  const key = shared.getId();
1806
1806
  const flag = isPureComponent(node) ? ComponentFlag.PureComponent : ComponentFlag.None;
1807
1807
  components.set(
@@ -1834,7 +1834,7 @@ var ComponentPhaseRelevance = birecord__default.default({
1834
1834
  var isInversePhase = eff.dual(2, (a, b) => ComponentPhaseRelevance.get(a) === b);
1835
1835
  function isRenderFunctionLoose(context, node) {
1836
1836
  const { body, parent } = node;
1837
- if (AST9__namespace.getFunctionIdentifier(node)?.name.startsWith("render")) {
1837
+ if (AST9__namespace.getFunctionId(node)?.name.startsWith("render")) {
1838
1838
  return parent.type === types.AST_NODE_TYPES.JSXExpressionContainer && parent.parent.type === types.AST_NODE_TYPES.JSXAttribute && parent.parent.name.type === types.AST_NODE_TYPES.JSXIdentifier && parent.parent.name.name.startsWith("render");
1839
1839
  }
1840
1840
  return isJsxLike(
package/dist/index.mjs CHANGED
@@ -1010,7 +1010,7 @@ function isReactHookName(name) {
1010
1010
  // src/hook/hook-is.ts
1011
1011
  function isReactHook(node) {
1012
1012
  if (node == null) return false;
1013
- const id = AST9.getFunctionIdentifier(node);
1013
+ const id = AST9.getFunctionId(node);
1014
1014
  return id?.name != null && isReactHookName(id.name);
1015
1015
  }
1016
1016
  function isReactHookCall(node) {
@@ -1113,7 +1113,7 @@ function useHookCollector() {
1113
1113
  const hooks = /* @__PURE__ */ new Map();
1114
1114
  const functionEntries = [];
1115
1115
  const onFunctionEnter = (node) => {
1116
- const id = AST9.getFunctionIdentifier(node);
1116
+ const id = AST9.getFunctionId(node);
1117
1117
  const key = getId();
1118
1118
  const name = id?.name;
1119
1119
  if (name != null && isReactHookName(name)) {
@@ -1606,7 +1606,7 @@ function isComponentWrapperCallLoose(context, node) {
1606
1606
 
1607
1607
  // src/component/component-id.ts
1608
1608
  function getFunctionComponentId(context, node) {
1609
- const functionId = AST9.getFunctionIdentifier(node);
1609
+ const functionId = AST9.getFunctionId(node);
1610
1610
  if (functionId != null) {
1611
1611
  return functionId;
1612
1612
  }
@@ -1775,7 +1775,7 @@ function useComponentCollectorLegacy() {
1775
1775
  if (!isClassComponent(node)) {
1776
1776
  return;
1777
1777
  }
1778
- const id = AST9.getClassIdentifier(node);
1778
+ const id = AST9.getClassId(node);
1779
1779
  const key = getId();
1780
1780
  const flag = isPureComponent(node) ? ComponentFlag.PureComponent : ComponentFlag.None;
1781
1781
  components.set(
@@ -1808,7 +1808,7 @@ var ComponentPhaseRelevance = birecord({
1808
1808
  var isInversePhase = dual(2, (a, b) => ComponentPhaseRelevance.get(a) === b);
1809
1809
  function isRenderFunctionLoose(context, node) {
1810
1810
  const { body, parent } = node;
1811
- if (AST9.getFunctionIdentifier(node)?.name.startsWith("render")) {
1811
+ if (AST9.getFunctionId(node)?.name.startsWith("render")) {
1812
1812
  return parent.type === AST_NODE_TYPES.JSXExpressionContainer && parent.parent.type === AST_NODE_TYPES.JSXAttribute && parent.parent.name.type === AST_NODE_TYPES.JSXIdentifier && parent.parent.name.name.startsWith("render");
1813
1813
  }
1814
1814
  return isJsxLike(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/core",
3
- "version": "1.48.2-next.0",
3
+ "version": "1.48.2",
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": {
@@ -41,11 +41,11 @@
41
41
  "@typescript-eslint/utils": "^8.30.1",
42
42
  "birecord": "^0.1.1",
43
43
  "ts-pattern": "^5.7.0",
44
- "@eslint-react/ast": "1.48.2-next.0",
45
- "@eslint-react/eff": "1.48.2-next.0",
46
- "@eslint-react/shared": "1.48.2-next.0",
47
- "@eslint-react/var": "1.48.2-next.0",
48
- "@eslint-react/kit": "1.48.2-next.0"
44
+ "@eslint-react/eff": "1.48.2",
45
+ "@eslint-react/shared": "1.48.2",
46
+ "@eslint-react/ast": "1.48.2",
47
+ "@eslint-react/kit": "1.48.2",
48
+ "@eslint-react/var": "1.48.2"
49
49
  },
50
50
  "devDependencies": {
51
51
  "tsup": "^8.4.0",