@eslint-react/ast 5.28.0 → 5.28.2
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 +5 -4
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -42,10 +42,11 @@ declare const isOneOf: <NodeTypes extends readonly AST_NODE_TYPES[]>(nodeTypes:
|
|
|
42
42
|
*/
|
|
43
43
|
declare function isIdentifier(node: TSESTree.Node, name?: string): node is TSESTree.Identifier;
|
|
44
44
|
/**
|
|
45
|
-
* Check if a node is
|
|
45
|
+
* Check if a node is an expression statement, optionally requiring it to be a directive
|
|
46
|
+
* with a specific name (ex: `"use client"`).
|
|
46
47
|
* @param node The node to check.
|
|
47
|
-
* @param name The directive name to match. When omitted, any
|
|
48
|
-
* @returns `true` if the node is a
|
|
48
|
+
* @param name The directive name to match. When omitted, any expression statement matches.
|
|
49
|
+
* @returns `true` if the node is an expression statement and, when `name` is given, a directive with that name.
|
|
49
50
|
*/
|
|
50
51
|
declare function isDirective(node: TSESTree.Node, name?: string): node is TSESTreeDirective;
|
|
51
52
|
/** Check if a node is a call expression. */
|
|
@@ -68,7 +69,7 @@ declare const isFunctionOrClass: (node: TSESTree.Node | null | undefined) => nod
|
|
|
68
69
|
declare const isProperty: (node: TSESTree.Node | null | undefined) => node is TSESTree.PropertyDefinitionComputedName | TSESTree.PropertyDefinitionNonComputedName | TSESTree.TSIndexSignature | TSESTree.TSParameterProperty | TSESTree.TSPropertySignatureComputedName | TSESTree.TSPropertySignatureNonComputedName;
|
|
69
70
|
/** Check if a node is a property or method definition. */
|
|
70
71
|
declare const isPropertyOrMethod: (node: TSESTree.Node | null | undefined) => node is TSESTree.MethodDefinitionComputedName | TSESTree.MethodDefinitionNonComputedName | TSESTree.PropertyDefinitionComputedName | TSESTree.PropertyDefinitionNonComputedName;
|
|
71
|
-
/** Check if a node is a conditional expression or a control flow statement. */
|
|
72
|
+
/** Check if a node is a conditional or logical expression, or a control flow statement. */
|
|
72
73
|
declare const isConditional: (node: TSESTree.Node | null | undefined) => node is TSESTree.ConditionalExpression | TSESTree.DoWhileStatement | TSESTree.ForInStatement | TSESTree.ForOfStatement | TSESTree.ForStatement | TSESTree.IfStatement | TSESTree.LogicalExpression | TSESTree.SwitchStatement | TSESTree.WhileStatement;
|
|
73
74
|
/** Check if a node is any JSX-related node. */
|
|
74
75
|
declare const isJSX: (node: TSESTree.Node | null | undefined) => node is TSESTree.JSXAttribute | TSESTree.JSXClosingElement | TSESTree.JSXClosingFragment | TSESTree.JSXElement | TSESTree.JSXEmptyExpression | TSESTree.JSXExpressionContainer | TSESTree.JSXFragment | TSESTree.JSXIdentifier | TSESTree.JSXMemberExpression | TSESTree.JSXNamespacedName | TSESTree.JSXOpeningElement | TSESTree.JSXOpeningFragment | TSESTree.JSXSpreadAttribute | TSESTree.JSXSpreadChild | TSESTree.JSXText;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/ast",
|
|
3
|
-
"version": "5.28.
|
|
3
|
+
"version": "5.28.2",
|
|
4
4
|
"description": "ESLint React's TSESTree AST utility module.",
|
|
5
5
|
"homepage": "https://github.com/Rel1cx/eslint-react",
|
|
6
6
|
"bugs": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@local/testkit": "0.0.0",
|
|
40
40
|
"@tsconfig/node20": "^20.1.10",
|
|
41
41
|
"@types/node": "^20.19.43",
|
|
42
|
-
"eslint": "^10.
|
|
42
|
+
"eslint": "^10.13.0",
|
|
43
43
|
"tsdown": "^0.23.1",
|
|
44
44
|
"typescript": "6.0.3",
|
|
45
45
|
"vitest": "^5.0.5"
|