@eslint-react/core 3.0.0-next.53 → 3.0.0-next.54

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.ts CHANGED
@@ -299,6 +299,18 @@ declare namespace useComponentCollectorLegacy {
299
299
  declare function useComponentCollectorLegacy(context: RuleContext): useComponentCollectorLegacy.ReturnType;
300
300
  //#endregion
301
301
  //#region src/component/component-detection-legacy.d.ts
302
+ /**
303
+ * Check if a node is a React class component
304
+ * @param node The AST node to check
305
+ * @returns `true` if the node is a class component, `false` otherwise
306
+ */
307
+ declare function isClassComponent(node: TSESTree.Node): node is ast.TSESTreeClass;
308
+ /**
309
+ * Check if a node is a React PureComponent
310
+ * @param node The AST node to check
311
+ * @returns `true` if the node is a PureComponent, `false` otherwise
312
+ */
313
+ declare function isPureComponent(node: TSESTree.Node): boolean;
302
314
  declare const isRender: (node: TSESTree.Node) => node is ast.TSESTreeMethodOrProperty;
303
315
  declare const isComponentDidCatch: (node: TSESTree.Node) => node is ast.TSESTreeMethodOrProperty;
304
316
  declare const isComponentDidMount: (node: TSESTree.Node) => node is ast.TSESTreeMethodOrProperty;
@@ -396,21 +408,6 @@ declare function getComponentFlagFromInitPath(initPath: FunctionComponentSemanti
396
408
  */
397
409
  declare function getFunctionComponentId(context: RuleContext, node: ast.TSESTreeFunction): ast.FunctionID;
398
410
  //#endregion
399
- //#region src/component/component-kind.d.ts
400
- type ComponentKind = "class-component" | "pure-component" | "function-component";
401
- /**
402
- * Check if a node is a React class component
403
- * @param node The AST node to check
404
- * @returns `true` if the node is a class component, `false` otherwise
405
- */
406
- declare function isClassComponent(node: TSESTree.Node): node is ast.TSESTreeClass;
407
- /**
408
- * Check if a node is a React PureComponent
409
- * @param node The AST node to check
410
- * @returns `true` if the node is a PureComponent, `false` otherwise
411
- */
412
- declare function isPureComponent(node: TSESTree.Node): boolean;
413
- //#endregion
414
411
  //#region src/component/component-name.d.ts
415
412
  /**
416
413
  * Check if a string matches the strict component name pattern
@@ -871,4 +868,4 @@ declare function getRefInit(name: string, initialScope: Scope): TSESTree$1.Expre
871
868
  */
872
869
  declare function isRefLikeName(name: string): boolean;
873
870
  //#endregion
874
- export { ClassComponentSemanticNode, ClientFunctionSemanticNode, ComponentDetectionHint, ComponentFlag, ComponentKind, ComponentSemanticNode, DEFAULT_COMPONENT_DETECTION_HINT, DEFAULT_JSX_DETECTION_HINT, FindEnclosingComponentOrHookFilter, FunctionComponentSemanticNode, FunctionKind, FunctionSemanticNode, HookSemanticNode, JsxAttributeValue, JsxConfig, JsxDetectionHint, JsxEmit, REACT_BUILTIN_HOOK_NAMES, SemanticFunc, SemanticNode, ServerFunctionSemanticNode, findEnclosingComponentOrHook, findParentJsxAttribute, getComponentFlagFromInitPath, getFunctionComponentId, getJsxAttribute, getJsxAttributeName, getJsxConfigFromAnnotation, getJsxConfigFromContext, getJsxElementType, getRefInit, isAssignmentToThisState, isCaptureOwnerStack, isCaptureOwnerStackCall, isChildrenCount, isChildrenCountCall, isChildrenForEach, isChildrenForEachCall, isChildrenMap, isChildrenMapCall, isChildrenOnly, isChildrenOnlyCall, isChildrenToArray, isChildrenToArrayCall, isClassComponent, isCloneElement, isCloneElementCall, isComponentDefinition, isComponentDidCatch, isComponentDidMount, isComponentDidMountCallback, isComponentDidUpdate, isComponentName, isComponentNameLoose, isComponentWillMount, isComponentWillReceiveProps, isComponentWillUnmount, isComponentWillUnmountCallback, isComponentWillUpdate, isComponentWrapperCall, isComponentWrapperCallLoose, isComponentWrapperCallback, isComponentWrapperCallbackLoose, isCreateContext, isCreateContextCall, isCreateElement, isCreateElementCall, isCreateRef, isCreateRefCall, isForwardRef, isForwardRefCall, isFunctionWithLooseComponentName, isGetChildContext, isGetDefaultProps, isGetDerivedStateFromError, isGetDerivedStateFromProps, isGetInitialState, isGetSnapshotBeforeUpdate, isHook, isHookCall, isHookCallWithName, isHookId, isHookName, isInitializedFromReact, isInitializedFromReactNative, isInitializedFromRef, isInsideComponentOrHook, isJsxFragmentElement, isJsxHostElement, isJsxLike, isJsxText, isLazy, isLazyCall, isMemo, isMemoCall, isPureComponent, isReactAPI, isReactAPICall, isRefId, isRefLikeName, isRender, isRenderMethodCallback, isRenderMethodLike, isShouldComponentUpdate, isThisSetState, isUnsafeComponentWillMount, isUnsafeComponentWillReceiveProps, isUnsafeComponentWillUpdate, isUseActionStateCall, isUseCall, isUseCallbackCall, isUseContextCall, isUseDebugValueCall, isUseDeferredValueCall, isUseEffectCall, isUseEffectCleanupCallback, isUseEffectLikeCall, isUseEffectSetupCallback, isUseFormStatusCall, isUseIdCall, isUseImperativeHandleCall, isUseInsertionEffectCall, isUseLayoutEffectCall, isUseMemoCall, isUseOptimisticCall, isUseReducerCall, isUseRefCall, isUseStateCall, isUseStateLikeCall, isUseSyncExternalStoreCall, isUseTransitionCall, resolveJsxAttributeValue, stringifyJsx, useComponentCollector, useComponentCollectorLegacy, useHookCollector };
871
+ export { ClassComponentSemanticNode, ClientFunctionSemanticNode, ComponentDetectionHint, ComponentFlag, ComponentSemanticNode, DEFAULT_COMPONENT_DETECTION_HINT, DEFAULT_JSX_DETECTION_HINT, FindEnclosingComponentOrHookFilter, FunctionComponentSemanticNode, FunctionKind, FunctionSemanticNode, HookSemanticNode, JsxAttributeValue, JsxConfig, JsxDetectionHint, JsxEmit, REACT_BUILTIN_HOOK_NAMES, SemanticFunc, SemanticNode, ServerFunctionSemanticNode, findEnclosingComponentOrHook, findParentJsxAttribute, getComponentFlagFromInitPath, getFunctionComponentId, getJsxAttribute, getJsxAttributeName, getJsxConfigFromAnnotation, getJsxConfigFromContext, getJsxElementType, getRefInit, isAssignmentToThisState, isCaptureOwnerStack, isCaptureOwnerStackCall, isChildrenCount, isChildrenCountCall, isChildrenForEach, isChildrenForEachCall, isChildrenMap, isChildrenMapCall, isChildrenOnly, isChildrenOnlyCall, isChildrenToArray, isChildrenToArrayCall, isClassComponent, isCloneElement, isCloneElementCall, isComponentDefinition, isComponentDidCatch, isComponentDidMount, isComponentDidMountCallback, isComponentDidUpdate, isComponentName, isComponentNameLoose, isComponentWillMount, isComponentWillReceiveProps, isComponentWillUnmount, isComponentWillUnmountCallback, isComponentWillUpdate, isComponentWrapperCall, isComponentWrapperCallLoose, isComponentWrapperCallback, isComponentWrapperCallbackLoose, isCreateContext, isCreateContextCall, isCreateElement, isCreateElementCall, isCreateRef, isCreateRefCall, isForwardRef, isForwardRefCall, isFunctionWithLooseComponentName, isGetChildContext, isGetDefaultProps, isGetDerivedStateFromError, isGetDerivedStateFromProps, isGetInitialState, isGetSnapshotBeforeUpdate, isHook, isHookCall, isHookCallWithName, isHookId, isHookName, isInitializedFromReact, isInitializedFromReactNative, isInitializedFromRef, isInsideComponentOrHook, isJsxFragmentElement, isJsxHostElement, isJsxLike, isJsxText, isLazy, isLazyCall, isMemo, isMemoCall, isPureComponent, isReactAPI, isReactAPICall, isRefId, isRefLikeName, isRender, isRenderMethodCallback, isRenderMethodLike, isShouldComponentUpdate, isThisSetState, isUnsafeComponentWillMount, isUnsafeComponentWillReceiveProps, isUnsafeComponentWillUpdate, isUseActionStateCall, isUseCall, isUseCallbackCall, isUseContextCall, isUseDebugValueCall, isUseDeferredValueCall, isUseEffectCall, isUseEffectCleanupCallback, isUseEffectLikeCall, isUseEffectSetupCallback, isUseFormStatusCall, isUseIdCall, isUseImperativeHandleCall, isUseInsertionEffectCall, isUseLayoutEffectCall, isUseMemoCall, isUseOptimisticCall, isUseReducerCall, isUseRefCall, isUseStateCall, isUseStateLikeCall, isUseSyncExternalStoreCall, isUseTransitionCall, resolveJsxAttributeValue, stringifyJsx, useComponentCollector, useComponentCollectorLegacy, useHookCollector };
package/dist/index.js CHANGED
@@ -666,7 +666,7 @@ function findParentJsxAttribute(node, test = constTrue) {
666
666
  }
667
667
 
668
668
  //#endregion
669
- //#region src/component/component-kind.ts
669
+ //#region src/component/component-detection-legacy.ts
670
670
  /**
671
671
  * Check if a node is a React class component
672
672
  * @param node The AST node to check
@@ -697,9 +697,6 @@ function isPureComponent(node) {
697
697
  }
698
698
  return false;
699
699
  }
700
-
701
- //#endregion
702
- //#region src/component/component-detection-legacy.ts
703
700
  /**
704
701
  * Create a lifecycle method checker function
705
702
  * @param methodName The lifecycle method name
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/core",
3
- "version": "3.0.0-next.53",
3
+ "version": "3.0.0-next.54",
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": {
@@ -34,13 +34,13 @@
34
34
  "@typescript-eslint/types": "canary",
35
35
  "@typescript-eslint/utils": "canary",
36
36
  "ts-pattern": "^5.9.0",
37
- "@eslint-react/eff": "3.0.0-next.53",
38
- "@eslint-react/ast": "3.0.0-next.53",
39
- "@eslint-react/shared": "3.0.0-next.53",
40
- "@eslint-react/var": "3.0.0-next.53"
37
+ "@eslint-react/ast": "3.0.0-next.54",
38
+ "@eslint-react/eff": "3.0.0-next.54",
39
+ "@eslint-react/shared": "3.0.0-next.54",
40
+ "@eslint-react/var": "3.0.0-next.54"
41
41
  },
42
42
  "devDependencies": {
43
- "tsdown": "^0.20.3",
43
+ "tsdown": "^0.21.0-beta.1",
44
44
  "@local/configs": "0.0.0"
45
45
  },
46
46
  "peerDependencies": {