@eslint-react/core 5.18.3 → 5.18.4
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 +1 -1
- package/dist/index.js +2 -5
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -373,7 +373,7 @@ type FunctionSemanticNode = ClientFunctionSemanticNode | ServerFunctionSemanticN
|
|
|
373
373
|
* @param node The function node to analyze.
|
|
374
374
|
* @returns The identifier node if found, `null` otherwise.
|
|
375
375
|
*/
|
|
376
|
-
declare function getFunctionId(node: TSESTree.Expression | TSESTreeFunction): TSESTree.ArrayExpression | TSESTree.ArrayPattern | TSESTree.ArrowFunctionExpressionWithBlockBody | TSESTree.ArrowFunctionExpressionWithExpressionBody | 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.
|
|
376
|
+
declare function getFunctionId(node: TSESTree.Expression | TSESTreeFunction): TSESTree.ArrayExpression | TSESTree.ArrayPattern | TSESTree.ArrowFunctionExpressionWithBlockBody | TSESTree.ArrowFunctionExpressionWithExpressionBody | 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.YieldNoStarExpression | TSESTree.YieldStarExpression | null;
|
|
377
377
|
/**
|
|
378
378
|
* Get the initialization path of a function node in the AST.
|
|
379
379
|
*
|
package/dist/index.js
CHANGED
|
@@ -1223,9 +1223,7 @@ function isFunctionComponentDefinition(context, node, hint) {
|
|
|
1223
1223
|
case parentCallee != null && parentCallee.type === AST_NODE_TYPES.MemberExpression && parentCalleeName === "flatMap":
|
|
1224
1224
|
if (hint & FunctionComponentDetectionHint.DoNotIncludeFunctionDefinedAsArrayFlatMapCallback) return false;
|
|
1225
1225
|
break;
|
|
1226
|
-
case parent.type === AST_NODE_TYPES.CallExpression && getFunctionId(node) == null && !isFunctionComponentWrapperCall(context, parent) && !isCreateElementCall(context, parent):
|
|
1227
|
-
if (hint & FunctionComponentDetectionHint.DoNotIncludeFunctionDefinedAsArbitraryCallExpressionCallback) return false;
|
|
1228
|
-
break;
|
|
1226
|
+
case parent.type === AST_NODE_TYPES.CallExpression && getFunctionId(node) == null && !isFunctionComponentWrapperCall(context, parent) && !isCreateElementCall(context, parent): if (hint & FunctionComponentDetectionHint.DoNotIncludeFunctionDefinedAsArbitraryCallExpressionCallback) return false;
|
|
1229
1227
|
}
|
|
1230
1228
|
const significantParent = Traverse.findParent(node, Check.isOneOf([
|
|
1231
1229
|
AST_NODE_TYPES.JSXExpressionContainer,
|
|
@@ -1788,8 +1786,7 @@ function getFullyQualifiedNameEx(checker, symbol) {
|
|
|
1788
1786
|
case ts.isMappedTypeNode(parent):
|
|
1789
1787
|
case ts.isObjectLiteralExpression(parent):
|
|
1790
1788
|
case ts.isIntersectionTypeNode(parent):
|
|
1791
|
-
case ts.isUnionTypeNode(parent):
|
|
1792
|
-
default: break;
|
|
1789
|
+
case ts.isUnionTypeNode(parent):
|
|
1793
1790
|
}
|
|
1794
1791
|
parent = parent.parent;
|
|
1795
1792
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/core",
|
|
3
|
-
"version": "5.18.
|
|
3
|
+
"version": "5.18.4",
|
|
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,21 +33,21 @@
|
|
|
33
33
|
"@typescript-eslint/types": "^8.66.0",
|
|
34
34
|
"@typescript-eslint/utils": "^8.66.0",
|
|
35
35
|
"ts-pattern": "^5.9.0",
|
|
36
|
-
"@eslint-react/ast": "5.18.
|
|
37
|
-
"@eslint-react/
|
|
38
|
-
"@eslint-react/
|
|
39
|
-
"@eslint-react/var": "5.18.
|
|
36
|
+
"@eslint-react/ast": "5.18.4",
|
|
37
|
+
"@eslint-react/eslint": "5.18.4",
|
|
38
|
+
"@eslint-react/shared": "5.18.4",
|
|
39
|
+
"@eslint-react/var": "5.18.4"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@typescript-eslint/parser": "^8.66.0",
|
|
43
43
|
"@typescript-eslint/typescript-estree": "^8.66.0",
|
|
44
|
-
"eslint": "^10.8.
|
|
44
|
+
"eslint": "^10.8.1",
|
|
45
45
|
"tsdown": "^0.22.14",
|
|
46
46
|
"typescript": "6.0.3",
|
|
47
47
|
"vitest": "^4.1.10",
|
|
48
|
-
"@local/eff": "0.0.0",
|
|
49
48
|
"@local/configs": "0.0.0",
|
|
50
|
-
"@local/testkit": "0.0.0"
|
|
49
|
+
"@local/testkit": "0.0.0",
|
|
50
|
+
"@local/eff": "0.0.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"eslint": "*",
|