@eslint-react/core 5.24.9 → 5.25.0
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 +0 -2
- package/dist/index.js +1 -22
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -497,8 +497,6 @@ export interface HookSemanticNode extends SemanticNode {
|
|
|
497
497
|
}
|
|
498
498
|
/** Represents a hook call, which can be a call expression or a tagged template expression. */
|
|
499
499
|
export type HookCall = TSESTree.CallExpression | TSESTree.TaggedTemplateExpression;
|
|
500
|
-
/** The names of React's built-in hooks. */
|
|
501
|
-
export declare const REACT_BUILTIN_HOOK_NAMES: readonly ["use", "useActionState", "useCallback", "useContext", "useDebugValue", "useDeferredValue", "useEffect", "useFormStatus", "useId", "useImperativeHandle", "useInsertionEffect", "useLayoutEffect", "useMemo", "useOptimistic", "useReducer", "useRef", "useState", "useSyncExternalStore", "useTransition"];
|
|
502
500
|
/**
|
|
503
501
|
* Check if the name is a hook name (starts with `use` followed by an uppercase letter or digit).
|
|
504
502
|
* @param name The name of the identifier to check.
|
package/dist/index.js
CHANGED
|
@@ -569,27 +569,6 @@ function isFunctionComponentDefinition(context, node, hint) {
|
|
|
569
569
|
}
|
|
570
570
|
//#endregion
|
|
571
571
|
//#region src/hook.ts
|
|
572
|
-
const REACT_BUILTIN_HOOK_NAMES = [
|
|
573
|
-
"use",
|
|
574
|
-
"useActionState",
|
|
575
|
-
"useCallback",
|
|
576
|
-
"useContext",
|
|
577
|
-
"useDebugValue",
|
|
578
|
-
"useDeferredValue",
|
|
579
|
-
"useEffect",
|
|
580
|
-
"useFormStatus",
|
|
581
|
-
"useId",
|
|
582
|
-
"useImperativeHandle",
|
|
583
|
-
"useInsertionEffect",
|
|
584
|
-
"useLayoutEffect",
|
|
585
|
-
"useMemo",
|
|
586
|
-
"useOptimistic",
|
|
587
|
-
"useReducer",
|
|
588
|
-
"useRef",
|
|
589
|
-
"useState",
|
|
590
|
-
"useSyncExternalStore",
|
|
591
|
-
"useTransition"
|
|
592
|
-
];
|
|
593
572
|
function isHookName(name) {
|
|
594
573
|
return name === "use" || /^use[A-Z0-9]/.test(name);
|
|
595
574
|
}
|
|
@@ -970,4 +949,4 @@ function getTypeVariants(types) {
|
|
|
970
949
|
return variants;
|
|
971
950
|
}
|
|
972
951
|
//#endregion
|
|
973
|
-
export { DEFAULT_COMPONENT_DETECTION_HINT, DEFAULT_JSX_DETECTION_HINT, FunctionComponentDetectionHint, FunctionComponentFlag, JsxDetectionHint,
|
|
952
|
+
export { DEFAULT_COMPONENT_DETECTION_HINT, DEFAULT_JSX_DETECTION_HINT, FunctionComponentDetectionHint, FunctionComponentFlag, JsxDetectionHint, SEL_FUNCTION_DISPLAY_NAME_ASSIGNMENT, getClassComponentCollector, getClassId, getCreateElementChildrenArguments, getCreateElementProp, getCreateElementPropsObject, getCreateElementTypeArgument, getFullyQualifiedNameEx, getFunctionComponentCollector, getFunctionComponentFlagFromInitPath, getFunctionComponentId, getFunctionDirectives, getFunctionId, getFunctionInitPath, getHookCollector, getJsxConfig, getJsxConfigFromAnnotation, getJsxConfigFromCompilerOptions, getTypeVariants, isAPI, isAPICall, isAnyType, isBigIntType, isBooleanLiteralType, isBooleanType, isCaptureOwnerStack, isCaptureOwnerStackCall, isChildrenCount, isChildrenCountCall, isChildrenForEach, isChildrenForEachCall, isChildrenMap, isChildrenMapCall, isChildrenOnly, isChildrenOnlyCall, isChildrenToArray, isChildrenToArrayCall, isClassComponent, isCloneElement, isCloneElementCall, isComponentDidCatch, isComponentDidMount, isComponentDidUpdate, isComponentWillMount, isComponentWillReceiveProps, isComponentWillUnmount, isComponentWillUpdate, isCreateContext, isCreateContextCall, isCreateElement, isCreateElementCall, isCreateElementChildrenArgument, isCreateRef, isCreateRefCall, isEnumType, isFalseLiteralType, isFalsyBigIntType, isFalsyNumberType, isFalsyStringType, isForwardRef, isForwardRefCall, isFunctionComponentDefinition, isFunctionComponentName, isFunctionComponentNameLoose, isFunctionComponentWrapperCall, isFunctionComponentWrapperCallback, isFunctionEmpty, isFunctionHasCallInInitPath, isFunctionHasDirective, isFunctionWithLooseComponentName, isGetChildContext, isGetDefaultProps, isGetDerivedStateFromError, isGetDerivedStateFromProps, isGetInitialState, isGetSnapshotBeforeUpdate, isHookCall, isHookDefinition, isHookId, isHookName, isHookTag, isInsideCreateElementProps, isJsxLike, isLazy, isLazyCall, isMemo, isMemoCall, isNeverType, isNullishType, isNumberType, isObjectType, isPureComponent, isRender, isRenderMethodCallback, isRenderMethodLike, isShouldComponentUpdate, isStringType, isThisSetStateCall, isTrueLiteralType, isTruthyBigIntType, isTruthyNumberType, isTruthyStringType, isUnknownType, isUnsafeComponentWillMount, isUnsafeComponentWillReceiveProps, isUnsafeComponentWillUpdate, isUse, isUseActionState, isUseActionStateCall, isUseCall, isUseCallback, isUseCallbackCall, isUseContext, isUseContextCall, isUseDebugValue, isUseDebugValueCall, isUseDeferredValue, isUseDeferredValueCall, isUseEffect, isUseEffectCall, isUseEffectCleanupCallback, isUseEffectLikeCall, isUseEffectSetupCallback, isUseFormStatus, isUseFormStatusCall, isUseId, isUseIdCall, isUseImperativeHandle, isUseImperativeHandleCall, isUseInsertionEffect, isUseInsertionEffectCall, isUseLayoutEffect, isUseLayoutEffectCall, isUseMemo, isUseMemoCall, isUseOptimistic, isUseOptimisticCall, isUseReducer, isUseReducerCall, isUseRef, isUseRefCall, isUseRefLikeCall, isUseState, isUseStateCall, isUseStateLikeCall, isUseSyncExternalStore, isUseSyncExternalStoreCall, isUseTransition, isUseTransitionCall };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/core",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.25.0",
|
|
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": {
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"dist"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@eslint-react/ast": "5.
|
|
33
|
-
"@eslint-react/eslint": "5.
|
|
34
|
-
"@eslint-react/shared": "5.
|
|
35
|
-
"@eslint-react/var": "5.
|
|
32
|
+
"@eslint-react/ast": "5.25.0",
|
|
33
|
+
"@eslint-react/eslint": "5.25.0",
|
|
34
|
+
"@eslint-react/shared": "5.25.0",
|
|
35
|
+
"@eslint-react/var": "5.25.0",
|
|
36
36
|
"@typescript-eslint/types": "^8.71.1",
|
|
37
37
|
"@typescript-eslint/utils": "^8.71.1",
|
|
38
38
|
"ts-pattern": "^5.9.0"
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@local/testkit": "0.0.0",
|
|
44
44
|
"@typescript-eslint/typescript-estree": "^8.71.1",
|
|
45
45
|
"eslint": "^10.12.0",
|
|
46
|
-
"tsdown": "^0.23.
|
|
46
|
+
"tsdown": "^0.23.1",
|
|
47
47
|
"typescript": "6.0.3",
|
|
48
48
|
"vitest": "^5.0.3"
|
|
49
49
|
},
|