@eslint-react/ast 1.45.0 → 1.45.1-next.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.mts +1 -3
- package/dist/index.d.ts +1 -3
- package/dist/index.js +0 -11
- package/dist/index.mjs +1 -11
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -198,8 +198,6 @@ declare function getNestedReturnStatements(node: TSESTree.Node): readonly TSESTr
|
|
|
198
198
|
|
|
199
199
|
declare function getPropertyName(node: TSESTree.Node): string | _;
|
|
200
200
|
|
|
201
|
-
declare function getTopLevelIdentifier(node: TSESTree.Node): TSESTree.Identifier | _;
|
|
202
|
-
|
|
203
201
|
declare const is: <NodeType extends TSESTree$1.AST_NODE_TYPES>(nodeType: NodeType) => (node: TSESTree$1.Node | null | undefined) => node is Extract<TSESTree$1.Node, {
|
|
204
202
|
type: NodeType;
|
|
205
203
|
}>;
|
|
@@ -299,4 +297,4 @@ declare function toReadableNodeName(node: TSESTree.Node, getText: (node: TSESTre
|
|
|
299
297
|
declare function toReadableNodeType(node: TSESTree.Node): "property" | "RegExp literal" | "string literal" | "number literal" | "bigint literal" | "boolean literal" | "symbol literal" | "undefined literal" | "object literal" | "function literal" | "null literal" | "identifier" | "member expression" | "JSX attribute" | "JSX element" | "JSX fragment" | "JSX identifier" | "JSX text" | "JSX closing element" | "JSX closing fragment" | "JSX empty expression" | "JSX expression container" | "JSX member expression" | "JSX namespaced name" | "JSX opening element" | "JSX opening fragment" | "JSX spread attribute" | "JSX spread child" | "decorator" | "program" | "super" | "accessor property" | "array expression" | "array pattern" | "function expression" | "arrow function expression" | "assignment expression" | "assignment pattern" | "await expression" | "binary expression" | "block statement" | "break statement" | "call expression" | "catch clause" | "chain expression" | "class body" | "class declaration" | "class expression" | "conditional expression" | "continue statement" | "debugger statement" | "while statement" | "do while statement" | "empty statement" | "export all declaration" | "export default declaration" | "export named declaration" | "export specifier" | "expression statement" | "for in statement" | "for of statement" | "for statement" | "function declaration" | "if statement" | "import attribute" | "import declaration" | "import default specifier" | "import expression" | "import namespace specifier" | "import specifier" | "labeled statement" | "logical expression" | "meta property" | "method definition" | "new expression" | "object expression" | "object pattern" | "private identifier" | "property definition" | "rest element" | "return statement" | "sequence expression" | "spread element" | "static block" | "switch case" | "switch statement" | "tagged template expression" | "template element" | "template literal" | "this expression" | "throw statement" | "try statement" | "unary expression" | "update expression" | "variable declaration" | "variable declarator" | "with statement" | "yield expression" | "ts abstract accessor property" | "ts abstract keyword" | "ts abstract method definition" | "ts abstract property definition" | "ts any keyword" | "ts array type" | "ts as expression" | "ts async keyword" | "ts big int keyword" | "ts boolean keyword" | "ts call signature declaration" | "ts class implements" | "ts conditional type" | "ts constructor type" | "ts construct signature declaration" | "ts declare function" | "ts declare keyword" | "ts empty body function expression" | "ts enum body" | "ts enum declaration" | "ts enum member" | "ts export assignment" | "ts export keyword" | "ts external module reference" | "ts function type" | "ts import equals declaration" | "ts import type" | "ts indexed access type" | "ts index signature" | "ts infer type" | "ts instantiation expression" | "ts interface body" | "ts interface declaration" | "ts interface heritage" | "ts intersection type" | "ts intrinsic keyword" | "ts literal type" | "ts mapped type" | "ts method signature" | "ts module block" | "ts module declaration" | "ts named tuple member" | "ts namespace export declaration" | "ts never keyword" | "ts non null expression" | "ts null keyword" | "ts number keyword" | "ts object keyword" | "ts optional type" | "ts parameter property" | "ts private keyword" | "ts property signature" | "ts protected keyword" | "ts public keyword" | "ts qualified name" | "ts readonly keyword" | "ts rest type" | "ts satisfies expression" | "ts static keyword" | "ts string keyword" | "ts symbol keyword" | "ts template literal type" | "ts this type" | "ts tuple type" | "ts type alias declaration" | "ts type annotation" | "ts type assertion" | "ts type literal" | "ts type operator" | "ts type parameter" | "ts type parameter declaration" | "ts type parameter instantiation" | "ts type predicate" | "ts type query" | "ts type reference" | "ts undefined keyword" | "ts union type" | "ts unknown keyword" | "ts void keyword";
|
|
300
298
|
type ReadableNodeType = ReturnType<typeof toReadableNodeType>;
|
|
301
299
|
|
|
302
|
-
export { type FunctionInitPath, type ReadableNodeType, type TSESTreeArrayTupleType, type TSESTreeClass, type TSESTreeDestructuringPattern, type TSESTreeFunction, type TSESTreeFunctionType, type TSESTreeJSX, type TSESTreeLoop, type TSESTreeMethodOrProperty, type TSESTreeProperty, type TSESTreeTypeAssertionExpression, type TSESTreeTypeDeclaration, type TSESTreeTypeExpression, findParentNode, getArrayMethodCallbackIndexParamPosition, getClassIdentifier, getEcmaExpression, getFunctionIdentifier, getFunctionInitPath, getLiteralValueType, getNestedCallExpressions, getNestedExpressionsOfType, getNestedIdentifiers, getNestedNewExpressions, getNestedReturnStatements, getPropertyName,
|
|
300
|
+
export { type FunctionInitPath, type ReadableNodeType, type TSESTreeArrayTupleType, type TSESTreeClass, type TSESTreeDestructuringPattern, type TSESTreeFunction, type TSESTreeFunctionType, type TSESTreeJSX, type TSESTreeLoop, type TSESTreeMethodOrProperty, type TSESTreeProperty, type TSESTreeTypeAssertionExpression, type TSESTreeTypeDeclaration, type TSESTreeTypeExpression, findParentNode, getArrayMethodCallbackIndexParamPosition, getClassIdentifier, getEcmaExpression, getFunctionIdentifier, getFunctionInitPath, getLiteralValueType, getNestedCallExpressions, getNestedExpressionsOfType, getNestedIdentifiers, getNestedNewExpressions, getNestedReturnStatements, getPropertyName, hasCallInFunctionInitPath, is, isArrayFromCall, isArrayMapCall, isArrayTupleType, isClass, isConditional, isControlFlow, isDestructuringPattern, isEmptyFunction, isFunction, isFunctionType, isJSX, isJSXElement, isJSXFragment, isJSXTagNameExpression, isLeftHandSideExpression, isLeftHandSideExpressionType, isLineBreak, isLiteral, isLoop, isMethodOrProperty, isMultiLine, isNodeEqual, isOneOf, isProcessEnvNodeEnv, isProcessEnvNodeEnvCompare, isProperty, isThisExpression, isTypeAssertionExpression, isTypeDeclaration, isTypeExpression, toReadableNodeName, toReadableNodeType };
|
package/dist/index.d.ts
CHANGED
|
@@ -198,8 +198,6 @@ declare function getNestedReturnStatements(node: TSESTree.Node): readonly TSESTr
|
|
|
198
198
|
|
|
199
199
|
declare function getPropertyName(node: TSESTree.Node): string | _;
|
|
200
200
|
|
|
201
|
-
declare function getTopLevelIdentifier(node: TSESTree.Node): TSESTree.Identifier | _;
|
|
202
|
-
|
|
203
201
|
declare const is: <NodeType extends TSESTree$1.AST_NODE_TYPES>(nodeType: NodeType) => (node: TSESTree$1.Node | null | undefined) => node is Extract<TSESTree$1.Node, {
|
|
204
202
|
type: NodeType;
|
|
205
203
|
}>;
|
|
@@ -299,4 +297,4 @@ declare function toReadableNodeName(node: TSESTree.Node, getText: (node: TSESTre
|
|
|
299
297
|
declare function toReadableNodeType(node: TSESTree.Node): "property" | "RegExp literal" | "string literal" | "number literal" | "bigint literal" | "boolean literal" | "symbol literal" | "undefined literal" | "object literal" | "function literal" | "null literal" | "identifier" | "member expression" | "JSX attribute" | "JSX element" | "JSX fragment" | "JSX identifier" | "JSX text" | "JSX closing element" | "JSX closing fragment" | "JSX empty expression" | "JSX expression container" | "JSX member expression" | "JSX namespaced name" | "JSX opening element" | "JSX opening fragment" | "JSX spread attribute" | "JSX spread child" | "decorator" | "program" | "super" | "accessor property" | "array expression" | "array pattern" | "function expression" | "arrow function expression" | "assignment expression" | "assignment pattern" | "await expression" | "binary expression" | "block statement" | "break statement" | "call expression" | "catch clause" | "chain expression" | "class body" | "class declaration" | "class expression" | "conditional expression" | "continue statement" | "debugger statement" | "while statement" | "do while statement" | "empty statement" | "export all declaration" | "export default declaration" | "export named declaration" | "export specifier" | "expression statement" | "for in statement" | "for of statement" | "for statement" | "function declaration" | "if statement" | "import attribute" | "import declaration" | "import default specifier" | "import expression" | "import namespace specifier" | "import specifier" | "labeled statement" | "logical expression" | "meta property" | "method definition" | "new expression" | "object expression" | "object pattern" | "private identifier" | "property definition" | "rest element" | "return statement" | "sequence expression" | "spread element" | "static block" | "switch case" | "switch statement" | "tagged template expression" | "template element" | "template literal" | "this expression" | "throw statement" | "try statement" | "unary expression" | "update expression" | "variable declaration" | "variable declarator" | "with statement" | "yield expression" | "ts abstract accessor property" | "ts abstract keyword" | "ts abstract method definition" | "ts abstract property definition" | "ts any keyword" | "ts array type" | "ts as expression" | "ts async keyword" | "ts big int keyword" | "ts boolean keyword" | "ts call signature declaration" | "ts class implements" | "ts conditional type" | "ts constructor type" | "ts construct signature declaration" | "ts declare function" | "ts declare keyword" | "ts empty body function expression" | "ts enum body" | "ts enum declaration" | "ts enum member" | "ts export assignment" | "ts export keyword" | "ts external module reference" | "ts function type" | "ts import equals declaration" | "ts import type" | "ts indexed access type" | "ts index signature" | "ts infer type" | "ts instantiation expression" | "ts interface body" | "ts interface declaration" | "ts interface heritage" | "ts intersection type" | "ts intrinsic keyword" | "ts literal type" | "ts mapped type" | "ts method signature" | "ts module block" | "ts module declaration" | "ts named tuple member" | "ts namespace export declaration" | "ts never keyword" | "ts non null expression" | "ts null keyword" | "ts number keyword" | "ts object keyword" | "ts optional type" | "ts parameter property" | "ts private keyword" | "ts property signature" | "ts protected keyword" | "ts public keyword" | "ts qualified name" | "ts readonly keyword" | "ts rest type" | "ts satisfies expression" | "ts static keyword" | "ts string keyword" | "ts symbol keyword" | "ts template literal type" | "ts this type" | "ts tuple type" | "ts type alias declaration" | "ts type annotation" | "ts type assertion" | "ts type literal" | "ts type operator" | "ts type parameter" | "ts type parameter declaration" | "ts type parameter instantiation" | "ts type predicate" | "ts type query" | "ts type reference" | "ts undefined keyword" | "ts union type" | "ts unknown keyword" | "ts void keyword";
|
|
300
298
|
type ReadableNodeType = ReturnType<typeof toReadableNodeType>;
|
|
301
299
|
|
|
302
|
-
export { type FunctionInitPath, type ReadableNodeType, type TSESTreeArrayTupleType, type TSESTreeClass, type TSESTreeDestructuringPattern, type TSESTreeFunction, type TSESTreeFunctionType, type TSESTreeJSX, type TSESTreeLoop, type TSESTreeMethodOrProperty, type TSESTreeProperty, type TSESTreeTypeAssertionExpression, type TSESTreeTypeDeclaration, type TSESTreeTypeExpression, findParentNode, getArrayMethodCallbackIndexParamPosition, getClassIdentifier, getEcmaExpression, getFunctionIdentifier, getFunctionInitPath, getLiteralValueType, getNestedCallExpressions, getNestedExpressionsOfType, getNestedIdentifiers, getNestedNewExpressions, getNestedReturnStatements, getPropertyName,
|
|
300
|
+
export { type FunctionInitPath, type ReadableNodeType, type TSESTreeArrayTupleType, type TSESTreeClass, type TSESTreeDestructuringPattern, type TSESTreeFunction, type TSESTreeFunctionType, type TSESTreeJSX, type TSESTreeLoop, type TSESTreeMethodOrProperty, type TSESTreeProperty, type TSESTreeTypeAssertionExpression, type TSESTreeTypeDeclaration, type TSESTreeTypeExpression, findParentNode, getArrayMethodCallbackIndexParamPosition, getClassIdentifier, getEcmaExpression, getFunctionIdentifier, getFunctionInitPath, getLiteralValueType, getNestedCallExpressions, getNestedExpressionsOfType, getNestedIdentifiers, getNestedNewExpressions, getNestedReturnStatements, getPropertyName, hasCallInFunctionInitPath, is, isArrayFromCall, isArrayMapCall, isArrayTupleType, isClass, isConditional, isControlFlow, isDestructuringPattern, isEmptyFunction, isFunction, isFunctionType, isJSX, isJSXElement, isJSXFragment, isJSXTagNameExpression, isLeftHandSideExpression, isLeftHandSideExpressionType, isLineBreak, isLiteral, isLoop, isMethodOrProperty, isMultiLine, isNodeEqual, isOneOf, isProcessEnvNodeEnv, isProcessEnvNodeEnvCompare, isProperty, isThisExpression, isTypeAssertionExpression, isTypeDeclaration, isTypeExpression, toReadableNodeName, toReadableNodeType };
|
package/dist/index.js
CHANGED
|
@@ -451,16 +451,6 @@ function getPropertyName(node) {
|
|
|
451
451
|
}
|
|
452
452
|
return eff._;
|
|
453
453
|
}
|
|
454
|
-
function getTopLevelIdentifier(node) {
|
|
455
|
-
switch (node.type) {
|
|
456
|
-
case types.AST_NODE_TYPES.Identifier:
|
|
457
|
-
return node;
|
|
458
|
-
case types.AST_NODE_TYPES.MemberExpression:
|
|
459
|
-
return getTopLevelIdentifier(node.object);
|
|
460
|
-
default:
|
|
461
|
-
return eff._;
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
454
|
function isArrayFromCall(node, loose = true) {
|
|
465
455
|
if (node.type !== types.AST_NODE_TYPES.CallExpression) return false;
|
|
466
456
|
if (node.callee.type !== types.AST_NODE_TYPES.MemberExpression) return false;
|
|
@@ -622,7 +612,6 @@ exports.getNestedIdentifiers = getNestedIdentifiers;
|
|
|
622
612
|
exports.getNestedNewExpressions = getNestedNewExpressions;
|
|
623
613
|
exports.getNestedReturnStatements = getNestedReturnStatements;
|
|
624
614
|
exports.getPropertyName = getPropertyName;
|
|
625
|
-
exports.getTopLevelIdentifier = getTopLevelIdentifier;
|
|
626
615
|
exports.hasCallInFunctionInitPath = hasCallInFunctionInitPath;
|
|
627
616
|
exports.is = is;
|
|
628
617
|
exports.isArrayFromCall = isArrayFromCall;
|
package/dist/index.mjs
CHANGED
|
@@ -449,16 +449,6 @@ function getPropertyName(node) {
|
|
|
449
449
|
}
|
|
450
450
|
return _;
|
|
451
451
|
}
|
|
452
|
-
function getTopLevelIdentifier(node) {
|
|
453
|
-
switch (node.type) {
|
|
454
|
-
case AST_NODE_TYPES.Identifier:
|
|
455
|
-
return node;
|
|
456
|
-
case AST_NODE_TYPES.MemberExpression:
|
|
457
|
-
return getTopLevelIdentifier(node.object);
|
|
458
|
-
default:
|
|
459
|
-
return _;
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
452
|
function isArrayFromCall(node, loose = true) {
|
|
463
453
|
if (node.type !== AST_NODE_TYPES.CallExpression) return false;
|
|
464
454
|
if (node.callee.type !== AST_NODE_TYPES.MemberExpression) return false;
|
|
@@ -607,4 +597,4 @@ function toReadableNodeType(node) {
|
|
|
607
597
|
return toLowerCase(delimiterCase(node.type, " "));
|
|
608
598
|
}
|
|
609
599
|
|
|
610
|
-
export { findParentNode, getArrayMethodCallbackIndexParamPosition, getClassIdentifier, getEcmaExpression, getFunctionIdentifier, getFunctionInitPath, getLiteralValueType, getNestedCallExpressions, getNestedExpressionsOfType, getNestedIdentifiers, getNestedNewExpressions, getNestedReturnStatements, getPropertyName,
|
|
600
|
+
export { findParentNode, getArrayMethodCallbackIndexParamPosition, getClassIdentifier, getEcmaExpression, getFunctionIdentifier, getFunctionInitPath, getLiteralValueType, getNestedCallExpressions, getNestedExpressionsOfType, getNestedIdentifiers, getNestedNewExpressions, getNestedReturnStatements, getPropertyName, hasCallInFunctionInitPath, is, isArrayFromCall, isArrayMapCall, isArrayTupleType, isClass, isConditional, isControlFlow, isDestructuringPattern, isEmptyFunction, isFunction, isFunctionType, isJSX, isJSXElement, isJSXFragment, isJSXTagNameExpression, isLeftHandSideExpression, isLeftHandSideExpressionType, isLineBreak, isLiteral, isLoop, isMethodOrProperty, isMultiLine, isNodeEqual, isOneOf, isProcessEnvNodeEnv, isProcessEnvNodeEnvCompare, isProperty, isThisExpression, isTypeAssertionExpression, isTypeDeclaration, isTypeExpression, toReadableNodeName, toReadableNodeType };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/ast",
|
|
3
|
-
"version": "1.45.0",
|
|
3
|
+
"version": "1.45.1-next.0",
|
|
4
4
|
"description": "ESLint React's TSESTree AST utility module.",
|
|
5
5
|
"homepage": "https://github.com/Rel1cx/eslint-react",
|
|
6
6
|
"bugs": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@typescript-eslint/utils": "^8.29.1",
|
|
41
41
|
"string-ts": "^2.2.1",
|
|
42
42
|
"ts-pattern": "^5.7.0",
|
|
43
|
-
"@eslint-react/eff": "1.45.0"
|
|
43
|
+
"@eslint-react/eff": "1.45.1-next.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"tsup": "^8.4.0",
|