@eslint-react/core 1.27.1-next.4 → 1.27.1-next.6

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.d.mts CHANGED
@@ -100,14 +100,6 @@ type FunctionEntry = {
100
100
  hookCalls: TSESTree.CallExpression[];
101
101
  isComponent: boolean;
102
102
  };
103
- /**
104
- * Get a ctx and listeners for the rule to collect function components
105
- * @param context The ESLint rule context
106
- * @param hint The hint to use
107
- * @param options The options to use
108
- * @returns The component collector
109
- */
110
- declare function useComponentCollector(context: RuleContext, hint?: bigint, options?: useComponentCollector.Options): useComponentCollector.ReturnType;
111
103
  declare namespace useComponentCollector {
112
104
  type Options = {
113
105
  collectDisplayName?: boolean;
@@ -122,12 +114,15 @@ declare namespace useComponentCollector {
122
114
  listeners: ESLintUtils.RuleListener;
123
115
  };
124
116
  }
125
-
126
117
  /**
127
- * Get a ctx and listeners for the rule to collect class components
128
- * @returns The context and listeners for the rule
118
+ * Get a ctx and listeners for the rule to collect function components
119
+ * @param context The ESLint rule context
120
+ * @param hint The hint to use
121
+ * @param options The options to use
122
+ * @returns The component collector
129
123
  */
130
- declare function useComponentCollectorLegacy(): useComponentCollectorLegacy.ReturnType;
124
+ declare function useComponentCollector(context: RuleContext, hint?: bigint, options?: useComponentCollector.Options): useComponentCollector.ReturnType;
125
+
131
126
  declare namespace useComponentCollectorLegacy {
132
127
  type ReturnType = {
133
128
  ctx: {
@@ -136,6 +131,11 @@ declare namespace useComponentCollectorLegacy {
136
131
  listeners: ESLintUtils.RuleListener;
137
132
  };
138
133
  }
134
+ /**
135
+ * Get a ctx and listeners for the rule to collect class components
136
+ * @returns The context and listeners for the rule
137
+ */
138
+ declare function useComponentCollectorLegacy(): useComponentCollectorLegacy.ReturnType;
139
139
 
140
140
  declare function getFunctionComponentIdentifier(node: AST.TSESTreeFunction, context: RuleContext): TSESTree.Identifier | TSESTree.Identifier[] | _;
141
141
 
@@ -279,7 +279,6 @@ interface ERHook extends ERSemanticNode {
279
279
  hookCalls: TSESTree.CallExpression[];
280
280
  }
281
281
 
282
- declare function useHookCollector(): useHookCollector.ReturnType;
283
282
  declare namespace useHookCollector {
284
283
  type ReturnType = {
285
284
  ctx: {
@@ -288,6 +287,7 @@ declare namespace useHookCollector {
288
287
  listeners: ESLintUtils.RuleListener;
289
288
  };
290
289
  }
290
+ declare function useHookCollector(): useHookCollector.ReturnType;
291
291
 
292
292
  type ERHookKind = "custom" | "useActionState" | "useCallback" | "useContext" | "useDebugValue" | "useDeferredValue" | "useEffect" | "useId" | "useImperativeHandle" | "useInsertionEffect" | "useLayoutEffect" | "useMemo" | "useOptimistic" | "useReducer" | "useRef" | "useState" | "useSyncExternalStore" | "useTransition";
293
293
 
@@ -350,14 +350,13 @@ declare function isFromReact(name: string): (node: TSESTree.Identifier | TSESTre
350
350
  * @returns A function that checks if a given node is a member expression of a Pragma member.
351
351
  */
352
352
  declare function isFromReactMember(memberName: string, name: string): (node: TSESTree.MemberExpression, context: RuleContext) => boolean;
353
- declare function isCallFromReact(name: string): isCallFromReact.ReturnType;
354
353
  declare namespace isCallFromReact {
355
354
  type ReturnType = {
356
355
  (context: RuleContext): (node: TSESTree.Node) => node is TSESTree.CallExpression;
357
356
  (node: TSESTree.Node, context: RuleContext): node is TSESTree.CallExpression;
358
357
  };
359
358
  }
360
- declare function isCallFromReactMember(pragmaMemberName: string, name: string): isCallFromReactMember.ReturnType;
359
+ declare function isCallFromReact(name: string): isCallFromReact.ReturnType;
361
360
  declare namespace isCallFromReactMember {
362
361
  type ReturnType = {
363
362
  (context: RuleContext): (node: TSESTree.Node) => node is TSESTree.CallExpression & {
@@ -368,6 +367,7 @@ declare namespace isCallFromReactMember {
368
367
  };
369
368
  };
370
369
  }
370
+ declare function isCallFromReactMember(pragmaMemberName: string, name: string): isCallFromReactMember.ReturnType;
371
371
 
372
372
  declare function isInitializedFromReact(name: string, importSource: string, initialScope: Scope): boolean;
373
373
 
package/dist/index.d.ts CHANGED
@@ -100,14 +100,6 @@ type FunctionEntry = {
100
100
  hookCalls: TSESTree.CallExpression[];
101
101
  isComponent: boolean;
102
102
  };
103
- /**
104
- * Get a ctx and listeners for the rule to collect function components
105
- * @param context The ESLint rule context
106
- * @param hint The hint to use
107
- * @param options The options to use
108
- * @returns The component collector
109
- */
110
- declare function useComponentCollector(context: RuleContext, hint?: bigint, options?: useComponentCollector.Options): useComponentCollector.ReturnType;
111
103
  declare namespace useComponentCollector {
112
104
  type Options = {
113
105
  collectDisplayName?: boolean;
@@ -122,12 +114,15 @@ declare namespace useComponentCollector {
122
114
  listeners: ESLintUtils.RuleListener;
123
115
  };
124
116
  }
125
-
126
117
  /**
127
- * Get a ctx and listeners for the rule to collect class components
128
- * @returns The context and listeners for the rule
118
+ * Get a ctx and listeners for the rule to collect function components
119
+ * @param context The ESLint rule context
120
+ * @param hint The hint to use
121
+ * @param options The options to use
122
+ * @returns The component collector
129
123
  */
130
- declare function useComponentCollectorLegacy(): useComponentCollectorLegacy.ReturnType;
124
+ declare function useComponentCollector(context: RuleContext, hint?: bigint, options?: useComponentCollector.Options): useComponentCollector.ReturnType;
125
+
131
126
  declare namespace useComponentCollectorLegacy {
132
127
  type ReturnType = {
133
128
  ctx: {
@@ -136,6 +131,11 @@ declare namespace useComponentCollectorLegacy {
136
131
  listeners: ESLintUtils.RuleListener;
137
132
  };
138
133
  }
134
+ /**
135
+ * Get a ctx and listeners for the rule to collect class components
136
+ * @returns The context and listeners for the rule
137
+ */
138
+ declare function useComponentCollectorLegacy(): useComponentCollectorLegacy.ReturnType;
139
139
 
140
140
  declare function getFunctionComponentIdentifier(node: AST.TSESTreeFunction, context: RuleContext): TSESTree.Identifier | TSESTree.Identifier[] | _;
141
141
 
@@ -279,7 +279,6 @@ interface ERHook extends ERSemanticNode {
279
279
  hookCalls: TSESTree.CallExpression[];
280
280
  }
281
281
 
282
- declare function useHookCollector(): useHookCollector.ReturnType;
283
282
  declare namespace useHookCollector {
284
283
  type ReturnType = {
285
284
  ctx: {
@@ -288,6 +287,7 @@ declare namespace useHookCollector {
288
287
  listeners: ESLintUtils.RuleListener;
289
288
  };
290
289
  }
290
+ declare function useHookCollector(): useHookCollector.ReturnType;
291
291
 
292
292
  type ERHookKind = "custom" | "useActionState" | "useCallback" | "useContext" | "useDebugValue" | "useDeferredValue" | "useEffect" | "useId" | "useImperativeHandle" | "useInsertionEffect" | "useLayoutEffect" | "useMemo" | "useOptimistic" | "useReducer" | "useRef" | "useState" | "useSyncExternalStore" | "useTransition";
293
293
 
@@ -350,14 +350,13 @@ declare function isFromReact(name: string): (node: TSESTree.Identifier | TSESTre
350
350
  * @returns A function that checks if a given node is a member expression of a Pragma member.
351
351
  */
352
352
  declare function isFromReactMember(memberName: string, name: string): (node: TSESTree.MemberExpression, context: RuleContext) => boolean;
353
- declare function isCallFromReact(name: string): isCallFromReact.ReturnType;
354
353
  declare namespace isCallFromReact {
355
354
  type ReturnType = {
356
355
  (context: RuleContext): (node: TSESTree.Node) => node is TSESTree.CallExpression;
357
356
  (node: TSESTree.Node, context: RuleContext): node is TSESTree.CallExpression;
358
357
  };
359
358
  }
360
- declare function isCallFromReactMember(pragmaMemberName: string, name: string): isCallFromReactMember.ReturnType;
359
+ declare function isCallFromReact(name: string): isCallFromReact.ReturnType;
361
360
  declare namespace isCallFromReactMember {
362
361
  type ReturnType = {
363
362
  (context: RuleContext): (node: TSESTree.Node) => node is TSESTree.CallExpression & {
@@ -368,6 +367,7 @@ declare namespace isCallFromReactMember {
368
367
  };
369
368
  };
370
369
  }
370
+ declare function isCallFromReactMember(pragmaMemberName: string, name: string): isCallFromReactMember.ReturnType;
371
371
 
372
372
  declare function isInitializedFromReact(name: string, importSource: string, initialScope: Scope): boolean;
373
373
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/core",
3
- "version": "1.27.1-next.4",
3
+ "version": "1.27.1-next.6",
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.24.1",
42
42
  "birecord": "^0.1.1",
43
43
  "ts-pattern": "^5.6.2",
44
- "@eslint-react/ast": "1.27.1-next.4",
45
- "@eslint-react/eff": "1.27.1-next.4",
46
- "@eslint-react/var": "1.27.1-next.4",
47
- "@eslint-react/shared": "1.27.1-next.4",
48
- "@eslint-react/jsx": "1.27.1-next.4"
44
+ "@eslint-react/ast": "1.27.1-next.6",
45
+ "@eslint-react/eff": "1.27.1-next.6",
46
+ "@eslint-react/jsx": "1.27.1-next.6",
47
+ "@eslint-react/shared": "1.27.1-next.6",
48
+ "@eslint-react/var": "1.27.1-next.6"
49
49
  },
50
50
  "devDependencies": {
51
51
  "tsup": "^8.3.6",