@eslint-react/core 5.8.18 → 5.9.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 +7 -39
- package/dist/index.js +46 -69
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TSESTreeClass, TSESTreeDirective, TSESTreeFunction, TSESTreeMethodOrPropertyDefinition } from "@eslint-react/ast";
|
|
2
2
|
import { TSESTree } from "@typescript-eslint/types";
|
|
3
|
+
import { JsxDetectionHint } from "@eslint-react/jsx";
|
|
3
4
|
import { RegExpLike } from "@eslint-react/shared";
|
|
4
5
|
import ts from "typescript";
|
|
5
6
|
import { RuleContext } from "@eslint-react/eslint";
|
|
@@ -304,7 +305,7 @@ type FunctionSemanticNode = ClientFunctionSemanticNode | ServerFunctionSemanticN
|
|
|
304
305
|
* @param node - The function node to analyze.
|
|
305
306
|
* @returns The identifier node if found, `null` otherwise.
|
|
306
307
|
*/
|
|
307
|
-
declare function getFunctionId(node: TSESTree.Expression | TSESTreeFunction): TSESTree.ArrayExpression | TSESTree.ArrayPattern | TSESTree.ArrowFunctionExpression | TSESTree.AssignmentExpression | TSESTree.AwaitExpression | TSESTree.PrivateInExpression | TSESTree.SymmetricBinaryExpression | TSESTree.CallExpression | TSESTree.ChainExpression | TSESTree.ClassExpression | TSESTree.ConditionalExpression | TSESTree.FunctionExpression | TSESTree.Identifier | TSESTree.ImportExpression | TSESTree.JSXElement | TSESTree.JSXFragment | TSESTree.BigIntLiteral | TSESTree.BooleanLiteral | TSESTree.NullLiteral | TSESTree.NumberLiteral | TSESTree.RegExpLiteral | TSESTree.StringLiteral | TSESTree.
|
|
308
|
+
declare function getFunctionId(node: TSESTree.Expression | TSESTreeFunction): TSESTree.ArrayExpression | TSESTree.ArrayPattern | TSESTree.ArrowFunctionExpression | TSESTree.AssignmentExpression | TSESTree.AwaitExpression | TSESTree.PrivateInExpression | TSESTree.SymmetricBinaryExpression | TSESTree.CallExpression | TSESTree.ChainExpression | TSESTree.ClassExpression | TSESTree.ConditionalExpression | TSESTree.FunctionExpression | TSESTree.Identifier | TSESTree.ImportExpression | TSESTree.JSXElement | TSESTree.JSXFragment | TSESTree.BigIntLiteral | TSESTree.BooleanLiteral | TSESTree.NullLiteral | TSESTree.NumberLiteral | TSESTree.RegExpLiteral | TSESTree.StringLiteral | TSESTree.LogicalExpression | TSESTree.MemberExpressionComputedName | TSESTree.MemberExpressionNonComputedName | TSESTree.MetaProperty | TSESTree.NewExpression | TSESTree.ObjectExpression | TSESTree.ObjectPattern | TSESTree.PrivateIdentifier | TSESTree.SequenceExpression | TSESTree.Super | TSESTree.TaggedTemplateExpression | TSESTree.TemplateLiteral | TSESTree.ThisExpression | TSESTree.TSAsExpression | TSESTree.TSInstantiationExpression | TSESTree.TSNonNullExpression | TSESTree.TSSatisfiesExpression | TSESTree.TSTypeAssertion | TSESTree.UnaryExpressionBitwiseNot | TSESTree.UnaryExpressionDelete | TSESTree.UnaryExpressionMinus | TSESTree.UnaryExpressionNot | TSESTree.UnaryExpressionPlus | TSESTree.UnaryExpressionTypeof | TSESTree.UnaryExpressionVoid | TSESTree.UpdateExpression | TSESTree.YieldExpression | null;
|
|
308
309
|
/**
|
|
309
310
|
* Identifies the initialization path of a function node in the AST.
|
|
310
311
|
*
|
|
@@ -604,49 +605,16 @@ declare namespace getHookCollector {
|
|
|
604
605
|
declare function getHookCollector(context: RuleContext): getHookCollector.ReturnType;
|
|
605
606
|
//#endregion
|
|
606
607
|
//#region src/jsx.d.ts
|
|
607
|
-
/**
|
|
608
|
-
* BitFlags for configuring JSX detection behavior.
|
|
609
|
-
*
|
|
610
|
-
* Used by {@link isJsxLike} to control which AST node kinds are
|
|
611
|
-
* considered "JSX-like". Combine flags with the `|` operator.
|
|
612
|
-
*
|
|
613
|
-
* @example
|
|
614
|
-
* ```ts
|
|
615
|
-
* const hint = JsxDetectionHint.DoNotIncludeJsxWithBooleanValue
|
|
616
|
-
* | JsxDetectionHint.DoNotIncludeJsxWithStringValue;
|
|
617
|
-
*
|
|
618
|
-
* isJsxLike(context, node, hint);
|
|
619
|
-
* ```
|
|
620
|
-
*/
|
|
621
|
-
type JsxDetectionHint = bigint;
|
|
622
|
-
declare const JsxDetectionHint: {
|
|
623
|
-
readonly None: 0n;
|
|
624
|
-
readonly DoNotIncludeJsxWithNullValue: bigint;
|
|
625
|
-
readonly DoNotIncludeJsxWithNumberValue: bigint;
|
|
626
|
-
readonly DoNotIncludeJsxWithBigIntValue: bigint;
|
|
627
|
-
readonly DoNotIncludeJsxWithStringValue: bigint;
|
|
628
|
-
readonly DoNotIncludeJsxWithBooleanValue: bigint;
|
|
629
|
-
readonly DoNotIncludeJsxWithUndefinedValue: bigint;
|
|
630
|
-
readonly DoNotIncludeJsxWithEmptyArrayValue: bigint;
|
|
631
|
-
readonly DoNotIncludeJsxWithCreateElementValue: bigint;
|
|
632
|
-
readonly RequireAllArrayElementsToBeJsx: bigint;
|
|
633
|
-
readonly RequireBothSidesOfLogicalExpressionToBeJsx: bigint;
|
|
634
|
-
readonly RequireBothBranchesOfConditionalExpressionToBeJsx: bigint;
|
|
635
|
-
};
|
|
636
|
-
/**
|
|
637
|
-
* Default JSX detection configuration.
|
|
638
|
-
*
|
|
639
|
-
* Skips number, bigint, boolean, string, and undefined literals –
|
|
640
|
-
* the value types that are commonly returned alongside JSX in React
|
|
641
|
-
* components but are not themselves renderable elements.
|
|
642
|
-
*/
|
|
643
|
-
declare const DEFAULT_JSX_DETECTION_HINT: JsxDetectionHint;
|
|
644
608
|
/**
|
|
645
609
|
* Determine whether a node represents JSX-like content based on heuristics.
|
|
646
610
|
*
|
|
647
611
|
* The detection behaviour is configurable through {@link JsxDetectionHint}
|
|
648
612
|
* bit-flags so that callers can opt individual value kinds in or out.
|
|
649
613
|
*
|
|
614
|
+
* Identifiers are resolved to their definitions via scope analysis;
|
|
615
|
+
* circular definitions (e.g. `var a = b; var b = a;`) are detected and
|
|
616
|
+
* treated as not JSX-like instead of recursing indefinitely.
|
|
617
|
+
*
|
|
650
618
|
* @param context - The ESLint rule context (needed for variable resolution).
|
|
651
619
|
* @param node - The AST node to analyse.
|
|
652
620
|
* @param hint - Optional bit-flags to adjust detection behaviour.
|
|
@@ -838,4 +806,4 @@ type TypeVariant = "any" | "bigint" | "boolean" | "enum" | "never" | "nullish" |
|
|
|
838
806
|
*/
|
|
839
807
|
declare function getTypeVariants(types: ts.Type[]): Set<TypeVariant>;
|
|
840
808
|
//#endregion
|
|
841
|
-
export { ClassComponentSemanticNode, ClientFunctionSemanticNode, DEFAULT_COMPONENT_DETECTION_HINT,
|
|
809
|
+
export { ClassComponentSemanticNode, ClientFunctionSemanticNode, DEFAULT_COMPONENT_DETECTION_HINT, FunctionComponentDetectionHint, FunctionComponentFlag, FunctionComponentSemanticNode, FunctionDisplayNameAssignment, FunctionID, FunctionInitPath, FunctionKind, FunctionSemanticNode, HookSemanticNode, JsxConfig, REACT_BUILTIN_HOOK_NAMES, SEL_FUNCTION_DISPLAY_NAME_ASSIGNMENT, SemanticFunc, SemanticNode, ServerFunctionSemanticNode, TypeVariant, getClassComponentCollector, getClassId, getFullyQualifiedNameEx, getFunctionComponentCollector, getFunctionComponentFlagFromInitPath, getFunctionComponentId, getFunctionDirectives, getFunctionId, getFunctionInitPath, getHookCollector, getJsxConfig, getJsxConfigFromAnnotation, getJsxConfigFromCompilerOptions, getTypeVariants, isAPI, isAPICall, isAPIFromReact, isAPIFromReactNative, isAnyType, isAssignmentToThisState, 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, 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, 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, isUseState, isUseStateCall, isUseStateLikeCall, isUseSyncExternalStore, isUseSyncExternalStoreCall, isUseTransition, isUseTransitionCall };
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Check, Extract, Traverse, is, isOneOf } from "@eslint-react/ast";
|
|
|
2
2
|
import { resolve, resolveImportSource } from "@eslint-react/var";
|
|
3
3
|
import { AST_NODE_TYPES } from "@typescript-eslint/types";
|
|
4
4
|
import { randomBytes } from "node:crypto";
|
|
5
|
-
import {
|
|
5
|
+
import { DEFAULT_JSX_DETECTION_HINT, JsxDetectionHint } from "@eslint-react/jsx";
|
|
6
6
|
import { RE_ANNOTATION_JSX, RE_ANNOTATION_JSX_FRAG, RE_ANNOTATION_JSX_IMPORT_SOURCE, RE_ANNOTATION_JSX_RUNTIME, RE_COMPONENT_NAME, RE_COMPONENT_NAME_LOOSE } from "@eslint-react/shared";
|
|
7
7
|
import ts from "typescript";
|
|
8
8
|
import { P, isMatching, match } from "ts-pattern";
|
|
@@ -637,7 +637,7 @@ function isFunctionWithLooseComponentName(context, fn, allowNone = false) {
|
|
|
637
637
|
* Hints for component collector
|
|
638
638
|
*/
|
|
639
639
|
const FunctionComponentDetectionHint = {
|
|
640
|
-
...JsxDetectionHint
|
|
640
|
+
...JsxDetectionHint,
|
|
641
641
|
DoNotIncludeFunctionDefinedAsClassMethod: 1n << 11n,
|
|
642
642
|
DoNotIncludeFunctionDefinedAsClassProperty: 1n << 12n,
|
|
643
643
|
DoNotIncludeFunctionDefinedAsObjectMethod: 1n << 13n,
|
|
@@ -839,34 +839,16 @@ function isUseEffectCleanupCallback(node) {
|
|
|
839
839
|
|
|
840
840
|
//#endregion
|
|
841
841
|
//#region src/jsx.ts
|
|
842
|
-
const JsxDetectionHint = {
|
|
843
|
-
None: 0n,
|
|
844
|
-
DoNotIncludeJsxWithNullValue: 1n << 0n,
|
|
845
|
-
DoNotIncludeJsxWithNumberValue: 1n << 1n,
|
|
846
|
-
DoNotIncludeJsxWithBigIntValue: 1n << 2n,
|
|
847
|
-
DoNotIncludeJsxWithStringValue: 1n << 3n,
|
|
848
|
-
DoNotIncludeJsxWithBooleanValue: 1n << 4n,
|
|
849
|
-
DoNotIncludeJsxWithUndefinedValue: 1n << 5n,
|
|
850
|
-
DoNotIncludeJsxWithEmptyArrayValue: 1n << 6n,
|
|
851
|
-
DoNotIncludeJsxWithCreateElementValue: 1n << 7n,
|
|
852
|
-
RequireAllArrayElementsToBeJsx: 1n << 8n,
|
|
853
|
-
RequireBothSidesOfLogicalExpressionToBeJsx: 1n << 9n,
|
|
854
|
-
RequireBothBranchesOfConditionalExpressionToBeJsx: 1n << 10n
|
|
855
|
-
};
|
|
856
|
-
/**
|
|
857
|
-
* Default JSX detection configuration.
|
|
858
|
-
*
|
|
859
|
-
* Skips number, bigint, boolean, string, and undefined literals –
|
|
860
|
-
* the value types that are commonly returned alongside JSX in React
|
|
861
|
-
* components but are not themselves renderable elements.
|
|
862
|
-
*/
|
|
863
|
-
const DEFAULT_JSX_DETECTION_HINT = 0n | JsxDetectionHint.DoNotIncludeJsxWithNumberValue | JsxDetectionHint.DoNotIncludeJsxWithBigIntValue | JsxDetectionHint.DoNotIncludeJsxWithBooleanValue | JsxDetectionHint.DoNotIncludeJsxWithStringValue | JsxDetectionHint.DoNotIncludeJsxWithUndefinedValue;
|
|
864
842
|
/**
|
|
865
843
|
* Determine whether a node represents JSX-like content based on heuristics.
|
|
866
844
|
*
|
|
867
845
|
* The detection behaviour is configurable through {@link JsxDetectionHint}
|
|
868
846
|
* bit-flags so that callers can opt individual value kinds in or out.
|
|
869
847
|
*
|
|
848
|
+
* Identifiers are resolved to their definitions via scope analysis;
|
|
849
|
+
* circular definitions (e.g. `var a = b; var b = a;`) are detected and
|
|
850
|
+
* treated as not JSX-like instead of recursing indefinitely.
|
|
851
|
+
*
|
|
870
852
|
* @param context - The ESLint rule context (needed for variable resolution).
|
|
871
853
|
* @param node - The AST node to analyse.
|
|
872
854
|
* @param hint - Optional bit-flags to adjust detection behaviour.
|
|
@@ -883,53 +865,48 @@ const DEFAULT_JSX_DETECTION_HINT = 0n | JsxDetectionHint.DoNotIncludeJsxWithNumb
|
|
|
883
865
|
* ```
|
|
884
866
|
*/
|
|
885
867
|
function isJsxLike(context, node, hint = DEFAULT_JSX_DETECTION_HINT) {
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
return
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
868
|
+
const visited = /* @__PURE__ */ new Set();
|
|
869
|
+
return visit(node);
|
|
870
|
+
function visit(node) {
|
|
871
|
+
if (node == null) return false;
|
|
872
|
+
if (Check.isJSX(node)) return true;
|
|
873
|
+
switch (node.type) {
|
|
874
|
+
case AST_NODE_TYPES.Literal:
|
|
875
|
+
switch (typeof node.value) {
|
|
876
|
+
case "boolean": return !(hint & JsxDetectionHint.DoNotIncludeJsxWithBooleanValue);
|
|
877
|
+
case "string": return !(hint & JsxDetectionHint.DoNotIncludeJsxWithStringValue);
|
|
878
|
+
case "number": return !(hint & JsxDetectionHint.DoNotIncludeJsxWithNumberValue);
|
|
879
|
+
case "bigint": return !(hint & JsxDetectionHint.DoNotIncludeJsxWithBigIntValue);
|
|
880
|
+
}
|
|
881
|
+
return node.value == null && !(hint & JsxDetectionHint.DoNotIncludeJsxWithNullValue);
|
|
882
|
+
case AST_NODE_TYPES.TemplateLiteral: return !(hint & JsxDetectionHint.DoNotIncludeJsxWithStringValue);
|
|
883
|
+
case AST_NODE_TYPES.ArrayExpression:
|
|
884
|
+
if (node.elements.length === 0) return !(hint & JsxDetectionHint.DoNotIncludeJsxWithEmptyArrayValue);
|
|
885
|
+
return hint & JsxDetectionHint.RequireAllArrayElementsToBeJsx ? node.elements.every(visit) : node.elements.some(visit);
|
|
886
|
+
case AST_NODE_TYPES.LogicalExpression:
|
|
887
|
+
if (hint & JsxDetectionHint.RequireBothSidesOfLogicalExpressionToBeJsx) return visit(node.left) && visit(node.right);
|
|
888
|
+
return visit(node.left) || visit(node.right);
|
|
889
|
+
case AST_NODE_TYPES.ConditionalExpression:
|
|
890
|
+
if (hint & JsxDetectionHint.RequireBothBranchesOfConditionalExpressionToBeJsx) return visit(node.consequent) && visit(node.alternate);
|
|
891
|
+
return visit(node.consequent) || visit(node.alternate);
|
|
892
|
+
case AST_NODE_TYPES.SequenceExpression: return visit(node.expressions.at(-1) ?? null);
|
|
893
|
+
case AST_NODE_TYPES.CallExpression: {
|
|
894
|
+
if (hint & JsxDetectionHint.DoNotIncludeJsxWithCreateElementValue) return false;
|
|
895
|
+
const callee = Extract.unwrap(node.callee);
|
|
896
|
+
switch (callee.type) {
|
|
897
|
+
case AST_NODE_TYPES.Identifier: return callee.name === "createElement";
|
|
898
|
+
case AST_NODE_TYPES.MemberExpression: return callee.property.type === AST_NODE_TYPES.Identifier && callee.property.name === "createElement";
|
|
899
|
+
default: return false;
|
|
900
|
+
}
|
|
919
901
|
}
|
|
920
|
-
|
|
902
|
+
case AST_NODE_TYPES.Identifier:
|
|
903
|
+
if (node.name === "undefined") return !(hint & JsxDetectionHint.DoNotIncludeJsxWithUndefinedValue);
|
|
904
|
+
if (visited.has(node)) return false;
|
|
905
|
+
visited.add(node);
|
|
906
|
+
return visit(resolve(context, node));
|
|
921
907
|
}
|
|
922
|
-
|
|
923
|
-
if (node.name === "undefined") return !(hint & JsxDetectionHint.DoNotIncludeJsxWithUndefinedValue);
|
|
924
|
-
if (Check.isJSXTagNameExpression(node)) return true;
|
|
925
|
-
return isJsxLike(context, resolve(context, node), hint);
|
|
908
|
+
return false;
|
|
926
909
|
}
|
|
927
|
-
return false;
|
|
928
|
-
}
|
|
929
|
-
function checkArray(context, elements, hint) {
|
|
930
|
-
if (elements.length === 0) return !(hint & JsxDetectionHint.DoNotIncludeJsxWithEmptyArrayValue);
|
|
931
|
-
if (hint & JsxDetectionHint.RequireAllArrayElementsToBeJsx) return elements.every((n) => isJsxLike(context, n, hint));
|
|
932
|
-
return elements.some((n) => isJsxLike(context, n, hint));
|
|
933
910
|
}
|
|
934
911
|
|
|
935
912
|
//#endregion
|
|
@@ -1321,4 +1298,4 @@ function getTypeVariants(types) {
|
|
|
1321
1298
|
}
|
|
1322
1299
|
|
|
1323
1300
|
//#endregion
|
|
1324
|
-
export { DEFAULT_COMPONENT_DETECTION_HINT,
|
|
1301
|
+
export { DEFAULT_COMPONENT_DETECTION_HINT, FunctionComponentDetectionHint, FunctionComponentFlag, REACT_BUILTIN_HOOK_NAMES, SEL_FUNCTION_DISPLAY_NAME_ASSIGNMENT, getClassComponentCollector, getClassId, getFullyQualifiedNameEx, getFunctionComponentCollector, getFunctionComponentFlagFromInitPath, getFunctionComponentId, getFunctionDirectives, getFunctionId, getFunctionInitPath, getHookCollector, getJsxConfig, getJsxConfigFromAnnotation, getJsxConfigFromCompilerOptions, getTypeVariants, isAPI, isAPICall, isAPIFromReact, isAPIFromReactNative, isAnyType, isAssignmentToThisState, 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, 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, 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, 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.9.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": {
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"@typescript-eslint/types": "^8.61.0",
|
|
34
34
|
"@typescript-eslint/utils": "^8.61.0",
|
|
35
35
|
"ts-pattern": "^5.9.0",
|
|
36
|
-
"@eslint-react/ast": "5.
|
|
37
|
-
"@eslint-react/
|
|
38
|
-
"@eslint-react/
|
|
39
|
-
"@eslint-react/
|
|
40
|
-
"@eslint-react/var": "5.
|
|
36
|
+
"@eslint-react/ast": "5.9.0",
|
|
37
|
+
"@eslint-react/shared": "5.9.0",
|
|
38
|
+
"@eslint-react/eslint": "5.9.0",
|
|
39
|
+
"@eslint-react/jsx": "5.9.0",
|
|
40
|
+
"@eslint-react/var": "5.9.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@typescript-eslint/parser": "^8.61.0",
|